summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2018-08-27 17:08:55 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2018-08-27 17:08:55 (GMT)
commitee2ddc088b10622b08d1b9484894cabd73374c37 (patch)
tree88d7058e344b86f9a5286f7e8cf3037c42c9b449 /src/gui
parentc766cdb2d0b36d065a6f2a56aa1541146592374d (diff)
Reset current view from the main dock station only.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/editor.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/gui/editor.c b/src/gui/editor.c
index 05afa64..39fd13b 100644
--- a/src/gui/editor.c
+++ b/src/gui/editor.c
@@ -684,6 +684,7 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, gpoi
{
GLoadedPanel *panel; /* Vue du contenu chargé */
GLoadedContent *content; /* Contenu en cours d'édition */
+ char *path; /* Chemin d'accueil concerné */
if (!G_IS_LOADED_PANEL(widget) && GTK_IS_SCROLLED_WINDOW(widget))
widget = gtk_bin_get_child(GTK_BIN(widget));
@@ -707,8 +708,17 @@ static void on_dock_item_switch(GtkDockStation *station, GtkWidget *widget, gpoi
else
{
- change_editor_items_current_content(NULL);
- change_editor_items_current_view(NULL);
+ path = gtk_tiled_grid_get_path_for_station(get_tiled_grid(), station);
+ assert(path != NULL);
+
+ if (strcmp(path, "M") == 0)
+ {
+ change_editor_items_current_content(NULL);
+ change_editor_items_current_view(NULL);
+ }
+
+ free(path);
+
}
}