Skip to content

Commit c33d020

Browse files
authored
fix: editing tags from preview panel updates database (#641)
* fix: bug where preview_panel tag was out of date compared to tag in database after edits where made using the tagDatabasePanel * fix: changes made in the preview panel are saved to the database
1 parent ebc487e commit c33d020

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

tagstudio/src/qt/ts_qt.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,11 @@ def clear_select_action_callback(self):
656656

657657
def show_tag_database(self):
658658
self.modal = PanelModal(
659-
TagDatabasePanel(self.lib), "Library Tags", "Library Tags", has_save=False
659+
widget=TagDatabasePanel(self.lib),
660+
title="Library Tags",
661+
window_title="Library Tags",
662+
done_callback=self.preview_panel.update_widgets,
663+
has_save=False,
660664
)
661665
self.modal.show()
662666

tagstudio/src/qt/widgets/tag_box.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ def edit_tag(self, tag: Tag):
139139
self.edit_modal.saved.connect(
140140
lambda: self.driver.lib.update_tag(
141141
build_tag_panel.build_tag(),
142-
subtag_ids=build_tag_panel.subtag_ids,
142+
subtag_ids=set(build_tag_panel.subtag_ids),
143+
alias_names=set(build_tag_panel.alias_names),
144+
alias_ids=set(build_tag_panel.alias_ids),
143145
)
144146
)
145147
self.edit_modal.show()

0 commit comments

Comments
 (0)