mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
settings gui catch SaveWarning
This commit is contained in:
parent
ad64ef3ff9
commit
55dd8f7005
1 changed files with 10 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ from openpype.settings.entities import (
|
|||
SchemaError
|
||||
)
|
||||
|
||||
from openpype.settings.lib import get_system_settings
|
||||
from openpype.settings import SaveWarning
|
||||
from .widgets import ProjectListWidget
|
||||
|
||||
from . import lib
|
||||
|
|
@ -272,6 +272,15 @@ class SettingsCategoryWidget(QtWidgets.QWidget):
|
|||
# not required.
|
||||
self.reset()
|
||||
|
||||
except SaveWarning as exc:
|
||||
msg = "<b>Settings were saved but few issues happened.</b>\n\n"
|
||||
msg += "\n".join(exc.warnings)
|
||||
|
||||
dialog = QtWidgets.QMessageBox(self)
|
||||
dialog.setText(msg)
|
||||
dialog.setIcon(QtWidgets.QMessageBox.Warning)
|
||||
dialog.exec_()
|
||||
|
||||
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