From c58db111c03afd76e85c587f5f27f96f8e7bf49d Mon Sep 17 00:00:00 2001 From: Ensiform Date: Fri, 16 Jun 2017 21:21:49 -0500 Subject: [PATCH] Prevent users from deleting the classname key in entity dialog Disables the Del Key/Val Pair button if the classname key is selected. --- radiant/groupdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/radiant/groupdialog.cpp b/radiant/groupdialog.cpp index 444524e8..4af2ffff 100644 --- a/radiant/groupdialog.cpp +++ b/radiant/groupdialog.cpp @@ -1085,6 +1085,10 @@ static void proplist_selection_changed( GtkTreeSelection* selection, gpointer da char* val; gtk_tree_model_get( model, &iter, 0, &key, 1, &val, -1 ); + if ( stricmp( key, "classname" ) == 0 ) { + gtk_widget_set_sensitive( del_button, FALSE ); + } + gtk_entry_set_text( GTK_ENTRY( EntWidgets[EntKeyField] ), key ); gtk_entry_set_text( GTK_ENTRY( EntWidgets[EntValueField] ), val );