Keep the scrolling position of navigation during reloading

This commit is contained in:
Techlive Zheng 2013-06-02 14:45:10 +08:00
parent 3430656538
commit ca1fab7f2d

View file

@ -186,11 +186,15 @@ 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) => {
d_navigation.get_vadjustment().set_value(vadj);
});
}
private void build_ui()