mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-28 04:19:40 +00:00
Do not emit 'ref_activated' signal during a reloading
This commit is contained in:
parent
5cf7434857
commit
b9dfbc0778
|
@ -68,6 +68,7 @@ namespace GitgHistory
|
||||||
private SList<Gtk.TreeIter?> d_parents;
|
private SList<Gtk.TreeIter?> d_parents;
|
||||||
private uint d_sections;
|
private uint d_sections;
|
||||||
private Activated[] d_callbacks;
|
private Activated[] d_callbacks;
|
||||||
|
private bool d_reloading;
|
||||||
private Gitg.Repository? d_repository;
|
private Gitg.Repository? d_repository;
|
||||||
private string? d_selected_head;
|
private string? d_selected_head;
|
||||||
private Gtk.TreeIter? d_selected_iter;
|
private Gtk.TreeIter? d_selected_iter;
|
||||||
|
@ -381,8 +382,10 @@ namespace GitgHistory
|
||||||
{
|
{
|
||||||
if (d_repository != null)
|
if (d_repository != null)
|
||||||
{
|
{
|
||||||
|
d_reloading = true;
|
||||||
clear();
|
clear();
|
||||||
populate(d_repository);
|
populate(d_repository);
|
||||||
|
d_reloading = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,6 +403,11 @@ namespace GitgHistory
|
||||||
|
|
||||||
private void activate_ref(Gitg.Ref? r)
|
private void activate_ref(Gitg.Ref? r)
|
||||||
{
|
{
|
||||||
|
if (d_reloading)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (r != null)
|
if (r != null)
|
||||||
{
|
{
|
||||||
d_selected_head = r.parsed_name.name;
|
d_selected_head = r.parsed_name.name;
|
||||||
|
|
|
@ -200,9 +200,7 @@ namespace GitgHistory
|
||||||
public void reload()
|
public void reload()
|
||||||
{
|
{
|
||||||
double vadj = d_navigation.get_vadjustment().get_value();
|
double vadj = d_navigation.get_vadjustment().get_value();
|
||||||
d_navigation.set_model(null);
|
|
||||||
d_navigation_model.reload();
|
d_navigation_model.reload();
|
||||||
d_navigation.set_model(d_navigation_model);
|
|
||||||
d_navigation.expand_all();
|
d_navigation.expand_all();
|
||||||
d_navigation.select();
|
d_navigation.select();
|
||||||
d_navigation.size_allocate.connect((a) => {
|
d_navigation.size_allocate.connect((a) => {
|
||||||
|
|
Loading…
Reference in a new issue