mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
show dialog if paste crashes
This commit is contained in:
parent
8eeeda11e7
commit
2e8df3e2d0
1 changed files with 8 additions and 6 deletions
|
|
@ -199,12 +199,14 @@ class BaseWidget(QtWidgets.QWidget):
|
|||
try:
|
||||
self.entity.set(value)
|
||||
except Exception:
|
||||
# TODO show dialog
|
||||
print("Failed")
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
traceback.print_exception(*sys.exc_info())
|
||||
dialog = QtWidgets.QMessageBox(self)
|
||||
dialog.setWindowTitle("Value does not match settings schema")
|
||||
dialog.setIcon(QtWidgets.QMessageBox.Warning)
|
||||
dialog.setText((
|
||||
"Pasted value does not seem to match schema of destination"
|
||||
" settings entity."
|
||||
))
|
||||
dialog.exec_()
|
||||
|
||||
def paste_value_to_path():
|
||||
entity = self.entity.get_entity_from_path(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue