Skip to content

Commit

Permalink
Memory leak fixed, dialogs properly delete themselves when closed...
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacrobinson2000 committed Apr 14, 2020
1 parent 39a4ea3 commit e1c2dfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gui/cursorthememaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def __init__(self, parent=None, name=""):
self._theme_text.textChanged.connect(lambda a: self.validate())

self.accepted.connect(self.on_submit_stuff)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)

def openDir(self):
sel_dir = QtWidgets.QFileDialog.getExistingDirectory(self, "Select a Directory")
Expand Down Expand Up @@ -330,6 +331,7 @@ def __init__(self, parent=None, metadata: Dict[str, Any]=None):
self._licence_btn.clicked.connect(self._on_file_req)
self._submit_btns.accepted.connect(self._on_accept)
self._submit_btns.rejected.connect(self.reject)
self.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)

def _on_file_req(self):
path, __ = QtWidgets.QFileDialog.getOpenFileName(self, "Select a Licence File", filter=self.FILE_PICKER_FILTER)
Expand Down

0 comments on commit e1c2dfa

Please sign in to comment.