diff options
-rw-r--r-- | src/gui/core/items.c | 12 | ||||
-rw-r--r-- | src/gui/menus/view.c | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/core/items.c b/src/gui/core/items.c index ad2de2c..68d2556 100644 --- a/src/gui/core/items.c +++ b/src/gui/core/items.c @@ -33,6 +33,10 @@ /* Liste des éléments enregistrés */ static GEditorItem *_editem_list = NULL; +/* Initialisations premières de façon unique */ +static bool _first_content_change = true; +static bool _first_panel_change = true; + /* Lance une procédure de déplacement de la position courante. */ static void start_moving_to_cursor_in_loaded_panel(GLoadedPanel *, const GLineCursor *, gboolean, gpointer); @@ -80,8 +84,10 @@ void change_editor_items_current_content(GLoadedContent *content) old = get_current_content(); - if (content != old) + if (content != old || _first_content_change) { + _first_content_change = false; + set_current_content(content); editem_list_for_each(iter, _editem_list) @@ -186,8 +192,10 @@ void change_editor_items_current_view(GLoadedPanel *panel) old = get_current_view(); - if (panel != old) + if (panel != old || _first_panel_change) { + _first_panel_change = false; + set_current_view(panel); editem_list_for_each(iter, _editem_list) diff --git a/src/gui/menus/view.c b/src/gui/menus/view.c index 8c34950..e1f95a1 100644 --- a/src/gui/menus/view.c +++ b/src/gui/menus/view.c @@ -452,6 +452,7 @@ static void update_switch_access_in_menu_view(void) if (panel == NULL) content = NULL; + else { content = g_loaded_panel_get_content(panel); |