Skip to content

Commit

Permalink
[Bug fix]: Fix "closeEvent"
Browse files Browse the repository at this point in the history
  • Loading branch information
PairZhu committed Jul 30, 2024
1 parent a377764 commit 0da5d27
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 5 additions & 2 deletions anylabeling/views/labeling/label_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def __init__(
self.parent = parent

# Create a labeling widget
view = LabelingWidget(
self.view = LabelingWidget(
self,
config=config,
filename=filename,
Expand All @@ -33,5 +33,8 @@ def __init__(
# Create the main layout and put labeling into
main_layout = QVBoxLayout()
main_layout.setContentsMargins(0, 0, 0, 0)
main_layout.addWidget(view)
main_layout.addWidget(self.view)
self.setLayout(main_layout)

def closeEvent(self, event):
self.view.closeEvent(event)
3 changes: 3 additions & 0 deletions anylabeling/views/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ def __init__(
status_bar = QStatusBar()
status_bar.showMessage(f"{__appname__} - {__appdescription__}")
self.setStatusBar(status_bar)

def closeEvent(self, event):
self.labeling_widget.closeEvent(event)

0 comments on commit 0da5d27

Please sign in to comment.