Skip to content

Commit

Permalink
fix(ui): ensure inner field containers are deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanVoxel committed Nov 28, 2024
1 parent 54003b6 commit f5d46c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tagstudio/src/qt/widgets/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ def set_remove_callback(self, callback: Callable):

def set_inner_widget(self, widget: "FieldWidget"):
if self.field_layout.itemAt(0):
self.field_layout.itemAt(0).widget().deleteLater()
old: QWidget = self.field_layout.itemAt(0).widget()
self.field_layout.removeWidget(old)
old.deleteLater()

self.field_layout.addWidget(widget)

def get_inner_widget(self):
Expand Down

0 comments on commit f5d46c2

Please sign in to comment.