diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2012-10-28 19:13:54 +0000 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2012-10-28 19:13:54 +0000 |
commit | 000f8eb62c6da6c76aba3c870c6976ca583ac0b6 (patch) | |
tree | 9829f506cd2df872b1f5ee62fe8cdcb97f88d604 /ui/gtk/color_edit_dlg.c | |
parent | 526f61a3409fda8b45c9f30a3fdb16c3980efab4 (diff) | |
download | wireshark-000f8eb62c6da6c76aba3c870c6976ca583ac0b6.tar.gz |
fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7913
When we create a new color filter, we prepend the color filter list with
a default entry and launch an edit dialogue. If the user cancels, we
have to remove this _first_ entry from the list (not the last one).
svn path=/trunk/; revision=45820
Diffstat (limited to 'ui/gtk/color_edit_dlg.c')
-rw-r--r-- | ui/gtk/color_edit_dlg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/gtk/color_edit_dlg.c b/ui/gtk/color_edit_dlg.c index 92ff458840..9dc2d1c4a1 100644 --- a/ui/gtk/color_edit_dlg.c +++ b/ui/gtk/color_edit_dlg.c @@ -469,8 +469,11 @@ edit_color_filter_ok_cb (GtkButton *button, static void edit_new_color_filter_cancel_cb(GtkButton *button, gpointer user_data _U_) { - /* Delete the entry. As a side effect this destroys the edit_dialog window. */ - color_delete_single(color_dlg_num_of_filters-1, (GtkWidget*)g_object_get_data(G_OBJECT(button), COLOR_FILTERS_CL)); + /* Delete the entry. As a side effect this destroys the edit_dialog window. + Before the edit dialogue was launched, the color filter list was + prepended with a default entry. This is the entry at position 0 that we + want to delete now. */ + color_delete_single(0, (GtkWidget*)g_object_get_data(G_OBJECT(button), COLOR_FILTERS_CL)); } static GtkWidget* |