summaryrefslogtreecommitdiff
path: root/src/gui/core/items.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/core/items.c')
-rw-r--r--src/gui/core/items.c12
1 files changed, 10 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)