diff --git a/plugins/history/gitg-history-navigation.vala b/plugins/history/gitg-history-navigation.vala index d9f0d67a..eb69836c 100644 --- a/plugins/history/gitg-history-navigation.vala +++ b/plugins/history/gitg-history-navigation.vala @@ -68,6 +68,7 @@ namespace GitgHistory private SList d_parents; private uint d_sections; private Activated[] d_callbacks; + private bool d_reloading; private Gitg.Repository? d_repository; private string? d_selected_head; private Gtk.TreeIter? d_selected_iter; @@ -381,8 +382,10 @@ namespace GitgHistory { if (d_repository != null) { + d_reloading = true; clear(); populate(d_repository); + d_reloading = false; } } @@ -400,6 +403,11 @@ namespace GitgHistory private void activate_ref(Gitg.Ref? r) { + if (d_reloading) + { + return; + } + if (r != null) { d_selected_head = r.parsed_name.name; diff --git a/plugins/history/gitg-history.vala b/plugins/history/gitg-history.vala index 5754eec0..d335fff3 100644 --- a/plugins/history/gitg-history.vala +++ b/plugins/history/gitg-history.vala @@ -200,9 +200,7 @@ namespace GitgHistory public void reload() { double vadj = d_navigation.get_vadjustment().get_value(); - d_navigation.set_model(null); d_navigation_model.reload(); - d_navigation.set_model(d_navigation_model); d_navigation.expand_all(); d_navigation.select(); d_navigation.size_allocate.connect((a) => {