diff options
Diffstat (limited to 'src/caja-pathbar.c')
-rw-r--r-- | src/caja-pathbar.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/caja-pathbar.c b/src/caja-pathbar.c index 78c100e2..1e810c19 100644 --- a/src/caja-pathbar.c +++ b/src/caja-pathbar.c @@ -1765,16 +1765,22 @@ button_data_file_changed (CajaFile *file, { gint idx, position; - /* remove this and the following buttons */ - position = g_list_position (path_bar->button_list, - g_list_find (path_bar->button_list, button_data)); - - if (position != -1) + /* if the current location is gone, don't do anything, as the view + * will get the event too and call us back. + */ + if (caja_file_compare_location (file, current_button_data->file) != 0) { - for (idx = 0; idx <= position; idx++) + /* remove this and the following buttons */ + position = g_list_position (path_bar->button_list, + g_list_find (path_bar->button_list, button_data)); + + if (position != -1) { - gtk_container_remove (GTK_CONTAINER (path_bar), - BUTTON_DATA (path_bar->button_list->data)->button); + for (idx = 0; idx <= position; idx++) + { + gtk_container_remove (GTK_CONTAINER (path_bar), + BUTTON_DATA (path_bar->button_list->data)->button); + } } } |