Skip to content

Commit

Permalink
Disconnect context menu signals in editor and viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo committed Nov 27, 2023
1 parent 50a9b5b commit 96c1f73
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions novelwriter/gui/doceditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,7 @@ def _openContextMenu(self, pos: QPoint) -> None:

# Execute the context menu
ctxMenu.exec_(self.viewport().mapToGlobal(pos))
ctxMenu.disconnect()
ctxMenu.deleteLater()

return
Expand Down
1 change: 1 addition & 0 deletions novelwriter/gui/docviewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ def _openContextMenu(self, point: QPoint) -> None:

# Open the context menu
ctxMenu.exec_(self.viewport().mapToGlobal(point))
ctxMenu.disconnect()
ctxMenu.deleteLater()

return
Expand Down

0 comments on commit 96c1f73

Please sign in to comment.