mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-09 21:24:36 +00:00
Fixed UI glitch introduced by the move from outline to table for results (the selected row would not be kept visible after refreshes).
This commit is contained in:
parent
c672e75739
commit
a056be0842
@ -62,8 +62,7 @@ class ResultTable(GUIObject, GUITable):
|
||||
#--- Override
|
||||
def connect(self):
|
||||
GUIObject.connect(self)
|
||||
self.refresh()
|
||||
self.view.refresh()
|
||||
self._refresh_with_view()
|
||||
|
||||
def _restore_selection(self, previous_selection):
|
||||
if self.app.selected_dupes:
|
||||
@ -86,6 +85,11 @@ class ResultTable(GUIObject, GUITable):
|
||||
group = self.app.results.get_group_of_duplicate(dupe)
|
||||
self.append(DupeRow(self, group, dupe))
|
||||
|
||||
def _refresh_with_view(self):
|
||||
self.refresh()
|
||||
self.view.refresh()
|
||||
self.view.show_selected_row()
|
||||
|
||||
#--- Public
|
||||
def get_row_value(self, index, column):
|
||||
try:
|
||||
@ -109,8 +113,7 @@ class ResultTable(GUIObject, GUITable):
|
||||
else:
|
||||
self.app.results.sort_groups(key, asc)
|
||||
self._sort_descriptors = (key, asc)
|
||||
self.refresh()
|
||||
self.view.refresh()
|
||||
self._refresh_with_view()
|
||||
|
||||
#--- Properties
|
||||
@property
|
||||
@ -124,8 +127,7 @@ class ResultTable(GUIObject, GUITable):
|
||||
self._power_marker = value
|
||||
key, asc = self._sort_descriptors
|
||||
self.sort(key, asc)
|
||||
self.refresh()
|
||||
self.view.refresh()
|
||||
# no need to refresh, it has happened in sort()
|
||||
|
||||
@property
|
||||
def delta_values(self):
|
||||
@ -148,8 +150,7 @@ class ResultTable(GUIObject, GUITable):
|
||||
self.view.invalidate_markings()
|
||||
|
||||
def results_changed(self):
|
||||
self.refresh()
|
||||
self.view.refresh()
|
||||
self._refresh_with_view()
|
||||
|
||||
def results_changed_but_keep_selection(self):
|
||||
# What we want to to here is that instead of restoring selected *dupes* after refresh, we
|
||||
|
Loading…
x
Reference in New Issue
Block a user