mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-02-12 04:39:31 +00:00
fix: store tag.id to variable before using in lambda
This fixes an issue where every tag added from the "+" button had ID 0 (the "Archived" tag). Co-Authored-By: Jann Stute <46534683+Computerdores@users.noreply.github.com>
This commit is contained in:
@@ -112,7 +112,8 @@ class TagSearchPanel(PanelWidget):
|
||||
f"background: {get_tag_color(ColorType.LIGHT_ACCENT, tag.color)};"
|
||||
f"}}"
|
||||
)
|
||||
add_button.clicked.connect(lambda x=tag.id: self.tag_chosen.emit(x))
|
||||
tag_id = tag.id
|
||||
add_button.clicked.connect(lambda: self.tag_chosen.emit(tag_id))
|
||||
row.addWidget(add_button)
|
||||
return container
|
||||
|
||||
|
||||
Reference in New Issue
Block a user