File tree Expand file tree Collapse file tree 4 files changed +35
-3
lines changed Expand file tree Collapse file tree 4 files changed +35
-3
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,10 @@ class ClassSignal:
158158 """
159159 _map = {}
160160
161+ def __init__ (self , * args , ** kwargs ):
162+ self ._args = args
163+ self ._kwargs = kwargs
164+
161165 def __get__ (self , instance , owner ):
162166 if instance is None :
163167 # When we access ClassSignal element on the class object without any instance,
Original file line number Diff line number Diff line change @@ -268,7 +268,15 @@ Page {
268268 unsavedSubmitDialog .open ()
269269 } else {
270270 try {
271- _reconstruction .submit (nodes)
271+
272+ if ( nodes .find (node => node .hasInvalidAttribute ) ) {
273+ submitWithWarningDialog .nodes = nodes
274+ submitWithWarningDialog .open ()
275+ } else {
276+ submit .open ()
277+ // _reconstruction.submit(nodes)
278+ }
279+
272280 }
273281 catch (error) {
274282 const data = ErrorHandler .analyseError (error)
@@ -399,6 +407,26 @@ Page {
399407 onAccepted: saveAsAction .trigger ()
400408 }
401409
410+ MessageDialog {
411+ id: submitWithWarningDialog
412+
413+ canCopy: false
414+ icon .text : MaterialIcons .warning
415+ parent: Overlay .overlay
416+ preset: " Warning"
417+ title: " Nodes have warnings"
418+ text: " Some nodes have warnings, are you sure you want to submit ?"
419+ helperText: " Submit even if some nodes have warnings"
420+ standardButtons: Dialog .Cancel | Dialog .Ok
421+
422+ property var nodes: []
423+
424+ onDiscarded: close ()
425+ onAccepted: {
426+ console .log (" submit nodes" , nodes)
427+ }
428+ }
429+
402430 MessageDialog {
403431 id: fileModifiedDialog
404432
Original file line number Diff line number Diff line change @@ -445,7 +445,7 @@ RowLayout {
445445
446446 MaterialLabel {
447447 visible: ! attribute .isOutput && errorMessages .length
448- text: MaterialIcons .warning
448+ text: MaterialIcons .fmd_bad
449449 ToolTip .text : errorMessages .join (" \n " )
450450 color: " orange"
451451 }
Original file line number Diff line number Diff line change @@ -281,7 +281,7 @@ Item {
281281 // Attribute warnings
282282 MaterialLabel {
283283 visible: hasWarnings
284- text: MaterialIcons .warning
284+ text: MaterialIcons .fmd_bad
285285 color: " orange"
286286 padding: 2
287287 font .pointSize : 7
You can’t perform that action at this time.
0 commit comments