mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-18 05:33:59 +00:00
PICARD-1909: Ensure main window gets updated on metadata changes
This commit is contained in:
@@ -1112,7 +1112,7 @@ class MainWindow(QtWidgets.QMainWindow, PreserveGeometry):
|
||||
self.tags_from_filenames_action.setEnabled(bool(files))
|
||||
self.track_search_action.setEnabled(have_objects)
|
||||
|
||||
def update_selection(self, objects=None, new_selection=True):
|
||||
def update_selection(self, objects=None, new_selection=True, drop_album_caches=False):
|
||||
if self.ignore_selection_changes:
|
||||
return
|
||||
|
||||
@@ -1178,7 +1178,7 @@ class MainWindow(QtWidgets.QMainWindow, PreserveGeometry):
|
||||
|
||||
if new_selection:
|
||||
self.metadata_box.selection_dirty = True
|
||||
self.metadata_box.update()
|
||||
self.metadata_box.update(drop_album_caches=drop_album_caches)
|
||||
self.cover_art_box.set_metadata(metadata, orig_metadata, obj)
|
||||
self.selection_updated.emit(objects)
|
||||
|
||||
|
||||
@@ -395,7 +395,7 @@ class MetadataBox(QtWidgets.QTableWidget):
|
||||
def _apply_update_funcs(self, funcs):
|
||||
for f in funcs:
|
||||
f()
|
||||
self.update(drop_album_caches=True)
|
||||
self.parent.update_selection(new_selection=False, drop_album_caches=True)
|
||||
|
||||
def edit_tag(self, tag):
|
||||
EditTagDialog(self.parent, tag).exec_()
|
||||
@@ -432,7 +432,7 @@ class MetadataBox(QtWidgets.QTableWidget):
|
||||
for tag in self.selected_tags(discard=('~length',)):
|
||||
if self.tag_is_removable(tag):
|
||||
self.remove_tag(tag)
|
||||
self.update(drop_album_caches=True)
|
||||
self.parent.update_selection(new_selection=False, drop_album_caches=True)
|
||||
|
||||
def tag_is_removable(self, tag):
|
||||
return self.tag_diff.status[tag] & TagStatus.NOTREMOVABLE == 0
|
||||
|
||||
Reference in New Issue
Block a user