From e1c2dfad0175de55849b2c699a61adb0938172f2 Mon Sep 17 00:00:00 2001 From: isaac Date: Tue, 14 Apr 2020 00:19:29 -0600 Subject: [PATCH] Memory leak fixed, dialogs properly delete themselves when closed... --- gui/cursorthememaker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/cursorthememaker.py b/gui/cursorthememaker.py index d1fd629..e5e3755 100644 --- a/gui/cursorthememaker.py +++ b/gui/cursorthememaker.py @@ -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") @@ -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)