qt: MyTreeView.refresh_all to use maybe_defer_update
In particular, window.timer_actions() calls request_list.refresh_all() and invoice_list.refresh_all(), every 0.5 seconds. We avoid doing this at least when those lists are not visible anyway.
This commit is contained in:
@@ -813,6 +813,8 @@ class MyTreeView(QTreeView):
|
||||
return row
|
||||
|
||||
def refresh_all(self):
|
||||
if self.maybe_defer_update():
|
||||
return
|
||||
for row in range(0, self.std_model.rowCount()):
|
||||
item = self.std_model.item(row, 0)
|
||||
key = item.data(self.key_role)
|
||||
|
||||
Reference in New Issue
Block a user