From 0f6034a0afeb3258ad0ddb18823474119d9c59f9 Mon Sep 17 00:00:00 2001 From: Jay Dolan Date: Sun, 18 Mar 2018 15:11:17 -0400 Subject: [PATCH] Hurr empty the texture dropdown like the Q3 surface inspector does. --- plugins/surface_idtech2/surfacedialog.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/surface_idtech2/surfacedialog.cpp b/plugins/surface_idtech2/surfacedialog.cpp index f4fe12f8..2f4aabd4 100644 --- a/plugins/surface_idtech2/surfacedialog.cpp +++ b/plugins/surface_idtech2/surfacedialog.cpp @@ -261,6 +261,15 @@ static void PopulateTextureComboList(){ blank[0] = 0; + //clear combo box +#if GTK_CHECK_VERSION( 3, 0, 0 ) + gtk_combo_box_text_remove_all( GTK_COMBO_BOX_TEXT( texture_combo ) ); +#else + GtkListStore *store; + store = GTK_LIST_STORE( gtk_combo_box_get_model( GTK_COMBO_BOX( texture_combo ) ) ); + gtk_list_store_clear( store ); +#endif + if ( texdef_face_list_empty() ) { items = g_list_append( items, (gpointer) blank ); // For Texture Entry, activate only on entry change