[gnome-builder/gnome-builder-3-32] code: clear buffer-changed state on load



commit 41fab185495408113446273e9ced2764a706772b
Author: Christian Hergert <chergert redhat com>
Date:   Tue May 7 08:08:59 2019 -0700

    code: clear buffer-changed state on load
    
    Otherwise, setting changed to TRUE later on will not trigger
    the action-bar to display.
    
    Related #908

 src/libide/code/ide-buffer.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/libide/code/ide-buffer.c b/src/libide/code/ide-buffer.c
index 5978216c8..40e533e94 100644
--- a/src/libide/code/ide-buffer.c
+++ b/src/libide/code/ide-buffer.c
@@ -1267,6 +1267,9 @@ ide_buffer_load_file_cb (GObject      *object,
   gtk_text_buffer_get_start_iter (GTK_TEXT_BUFFER (self), &iter);
   gtk_text_buffer_select_range (GTK_TEXT_BUFFER (self), &iter, &iter);
 
+  /* Assume we are at newest state at end of file-load operation */
+  _ide_buffer_set_changed_on_volume (self, FALSE);
+
   ide_highlight_engine_unpause (self->highlight_engine);
   ide_buffer_set_state (self, IDE_BUFFER_STATE_READY);
   ide_notification_set_progress (state->notif, 1.0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]