Skip to content

Commit

Permalink
fix: editing tags from preview panel updates database (#641)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
DandyDev01 authored Dec 14, 2024
1 parent ebc487e commit c33d020
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 5 additions & 1 deletion tagstudio/src/qt/ts_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,11 @@ def clear_select_action_callback(self):

def show_tag_database(self):
self.modal = PanelModal(
TagDatabasePanel(self.lib), "Library Tags", "Library Tags", has_save=False
widget=TagDatabasePanel(self.lib),
title="Library Tags",
window_title="Library Tags",
done_callback=self.preview_panel.update_widgets,
has_save=False,
)
self.modal.show()

Expand Down
4 changes: 3 additions & 1 deletion tagstudio/src/qt/widgets/tag_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ def edit_tag(self, tag: Tag):
self.edit_modal.saved.connect(
lambda: self.driver.lib.update_tag(
build_tag_panel.build_tag(),
subtag_ids=build_tag_panel.subtag_ids,
subtag_ids=set(build_tag_panel.subtag_ids),
alias_names=set(build_tag_panel.alias_names),
alias_ids=set(build_tag_panel.alias_ids),
)
)
self.edit_modal.show()
Expand Down

0 comments on commit c33d020

Please sign in to comment.