mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-01 07:39:10 +00:00
fix(ui): don't reload preview after applying macros
This commit is contained in:
@@ -1099,13 +1099,13 @@ class QtDriver(DriverMixin, QObject):
|
||||
yield 0
|
||||
|
||||
def run_macros(self, macro_name: str, entry_ids: list[int]):
|
||||
"""Run a specific Macro on a group of given entry_ids."""
|
||||
"""Run a Macro on a list of entires."""
|
||||
for entry_id in entry_ids:
|
||||
self.run_macro(macro_name, entry_id)
|
||||
self.main_window.preview_panel.update_preview()
|
||||
self.main_window.preview_panel.refresh_selection(update_preview=False)
|
||||
|
||||
def run_macro(self, macro_name: str, entry_id: int):
|
||||
"""Run a specific Macro on an Entry given a Macro name."""
|
||||
"""Run a Macro on a single entry."""
|
||||
if not self.lib.library_dir:
|
||||
logger.error("[QtDriver] Can't run macro when no library is open!")
|
||||
return
|
||||
|
||||
@@ -133,9 +133,9 @@ class PreviewPanelView(QWidget):
|
||||
def _set_selection_callback(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
def update_preview(self):
|
||||
def refresh_selection(self, update_preview: bool = True):
|
||||
"""Refresh the panel's widgets to use current library data."""
|
||||
self.set_selection(self._selected)
|
||||
self.set_selection(self._selected, update_preview)
|
||||
|
||||
def set_selection(self, selected: list[int] | None = None, update_preview: bool = True):
|
||||
"""Render the panel widgets with the newest data from the Library.
|
||||
|
||||
Reference in New Issue
Block a user