Skip to content

Commit f9eaf23

Browse files
committed
More fixes
1 parent ad6cf62 commit f9eaf23

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/SearchWindow.vala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ public class Detective.SearchWindow : Gtk.ApplicationWindow {
110110

111111
entry.stop_search.connect (destroy);
112112

113-
selection_model.items_changed.connect (update_vadjustment);
113+
selection_model.items_changed.connect (() => Idle.add (update_vadjustment));
114114

115115
weak_ref (engine.clear_search);
116116
}
117117

118-
private void update_vadjustment () {
118+
private bool update_vadjustment () {
119119
scrolled_window.vadjustment.value = 0;
120120
selection_model.selected = 0;
121121

@@ -124,5 +124,7 @@ public class Detective.SearchWindow : Gtk.ApplicationWindow {
124124
} else {
125125
stack.visible_child_name = "placeholder";
126126
}
127+
128+
return Source.REMOVE;
127129
}
128130
}

0 commit comments

Comments
 (0)