Revert storing of messagebox

- This is NOT done because the original crash was reproducible - but just out of pure legacy reasons for if the error might still occur. It would be worth looking into whether the crash can still be reproduced in recent Blender versions without this logic.
This commit is contained in:
Roy Nieterau 2022-02-22 15:28:05 +01:00
parent f576be7604
commit bb105209e8

View file

@ -544,6 +544,10 @@ class FilesWidget(QtWidgets.QWidget):
# file on a refresh of the files model.
self.auto_select_latest_modified = True
# Avoid crash in Blender and store the message box
# (setting parent doesn't work as it hides the message box)
self._messagebox = None
files_view = FilesView(self)
# Create the Files model
@ -722,7 +726,7 @@ class FilesWidget(QtWidgets.QWidget):
self.file_opened.emit()
def save_changes_prompt(self):
messagebox = QtWidgets.QMessageBox(parent=self)
self._messagebox = messagebox = QtWidgets.QMessageBox(parent=self)
messagebox.setWindowFlags(messagebox.windowFlags() |
QtCore.Qt.FramelessWindowHint)
messagebox.setIcon(messagebox.Warning)