File tree Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Expand file tree Collapse file tree 1 file changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,14 @@ Page {
129129 return true ;
130130 }
131131
132+ function getAllNodes () {
133+ const nodes = []
134+ for (let i= 0 ; i< graphEditor .graph .nodes .count ; i++ ) {
135+ nodes .push (graphEditor .graph .nodes .at (i))
136+ }
137+ return nodes
138+ }
139+
132140 // File dialogs
133141 Platform .FileDialog {
134142 id: saveFileDialog
@@ -266,22 +274,24 @@ Page {
266274 function submit (nodes ) {
267275 if (! canSubmit) {
268276 unsavedSubmitDialog .open ()
269- } else {
277+ }
278+ else {
270279 try {
271-
272- if ( nodes .find (node => node .hasInvalidAttribute ) ) {
280+ if (nodes == null ) {
281+ nodes = getAllNodes ()
282+ }
283+ if ( nodes && nodes .find (node => node .hasInvalidAttribute ) ) {
273284 submitWithWarningDialog .nodes = nodes
274285 submitWithWarningDialog .open ()
275286 } else {
276- submit .open ()
277- // _reconstruction.submit(nodes)
287+ _reconstruction .submit (nodes)
278288 }
279-
280289 }
281- catch (error) {
290+ catch (error) {
282291 const data = ErrorHandler .analyseError (error)
283- if (data .context === " SUBMITTING" )
292+ if (data .context === " SUBMITTING" ) {
284293 computeSubmitErrorDialog .openError (data .type , data .msg , nodes)
294+ }
285295 }
286296 }
287297 }
@@ -423,7 +433,7 @@ Page {
423433
424434 onDiscarded: close ()
425435 onAccepted: {
426- console . log ( " submit nodes " , nodes)
436+ _reconstruction . submit ( nodes)
427437 }
428438 }
429439
You can’t perform that action at this time.
0 commit comments