From bc2216a9f8a41b766956f862ee6d7602c0dba115 Mon Sep 17 00:00:00 2001 From: mappu Date: Mon, 6 Jan 2025 18:34:52 +1300 Subject: [PATCH] miqt: remove QTimer::singleShot that does not seem to be needed --- main.go | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/main.go b/main.go index 0997115..542266f 100644 --- a/main.go +++ b/main.go @@ -524,9 +524,7 @@ func (self *DockerGUI) refresh_containers() { self.filter_tree(self.containers_tree, self.containers_searchbar.Text()) self.restore_selection(self.containers_tree, selected_items) - qt.QTimer_SingleShot(0, func() { - self.containers_tree.VerticalScrollBar().SetValue(scroll_position) - }) + self.containers_tree.VerticalScrollBar().SetValue(scroll_position) } func (self *DockerGUI) refresh_images() { @@ -554,9 +552,7 @@ func (self *DockerGUI) refresh_images() { self.filter_tree(self.images_tree, self.images_searchbar.Text()) self.restore_selection(self.images_tree, selected_items) - qt.QTimer_SingleShot(0, func() { - self.images_tree.VerticalScrollBar().SetValue(scroll_position) - }) + self.images_tree.VerticalScrollBar().SetValue(scroll_position) } func (self *DockerGUI) refresh_networks() { @@ -582,9 +578,7 @@ func (self *DockerGUI) refresh_networks() { self.filter_tree(self.networks_tree, self.networks_searchbar.Text()) self.restore_selection(self.networks_tree, selected_items) - qt.QTimer_SingleShot(0, func() { - self.networks_tree.VerticalScrollBar().SetValue(scroll_position) - }) + self.networks_tree.VerticalScrollBar().SetValue(scroll_position) } func (self *DockerGUI) refresh_volumes() { @@ -610,9 +604,7 @@ func (self *DockerGUI) refresh_volumes() { self.filter_tree(self.volumes_tree, self.volumes_searchbar.Text()) self.restore_selection(self.volumes_tree, selected_items) - qt.QTimer_SingleShot(0, func() { - self.volumes_tree.VerticalScrollBar().SetValue(scroll_position) - }) + self.volumes_tree.VerticalScrollBar().SetValue(scroll_position) } func (self *DockerGUI) get_selected_items(tree *qt.QTreeWidget) []string {