mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
fixed save warning catch
This commit is contained in:
parent
d9424cdf39
commit
b01d541c59
1 changed files with 9 additions and 2 deletions
|
|
@ -273,14 +273,21 @@ class SettingsCategoryWidget(QtWidgets.QWidget):
|
|||
self.reset()
|
||||
|
||||
except SaveWarning as exc:
|
||||
msg = "<b>Settings were saved but few issues happened.</b>\n\n"
|
||||
msg += "\n".join(exc.warnings)
|
||||
warnings = [
|
||||
"<b>Settings were saved but few issues happened.</b>"
|
||||
]
|
||||
for item in exc.warnings:
|
||||
warnings.append(item.replace("\n", "<br>"))
|
||||
|
||||
msg = "<br><br>".join(warnings)
|
||||
|
||||
dialog = QtWidgets.QMessageBox(self)
|
||||
dialog.setText(msg)
|
||||
dialog.setIcon(QtWidgets.QMessageBox.Warning)
|
||||
dialog.exec_()
|
||||
|
||||
self.reset()
|
||||
|
||||
except Exception as exc:
|
||||
formatted_traceback = traceback.format_exception(*sys.exc_info())
|
||||
dialog = QtWidgets.QMessageBox(self)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue