-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compute or Submit selected nodes #2459
base: develop
Are you sure you want to change the base?
Conversation
b9e8fd1
to
32b53e8
Compare
MenuItem { | ||
text: "Compute Selected Node(s)" | ||
visible: uigraph.selectedNodes.count > 0 | ||
height: visible ? implicitHeight : 0 | ||
|
||
enabled: { | ||
var canCompute = false | ||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) { | ||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){ | ||
canCompute = true | ||
} | ||
} | ||
return canCompute | ||
} | ||
|
||
onTriggered: { | ||
computeRequest(uigraph.selectedNodes) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need to add a second menu to compute/submit the selected nodes. Everything that's done with these menus should instead be done with the regular "Compute" and "Submit" to avoid confusions for the user.
MenuItem { | ||
text: "Submit Selected Node(s)" | ||
visible: uigraph.selectedNodes.count > 0 | ||
height: visible ? implicitHeight : 0 | ||
|
||
enabled: { | ||
var canSubmit = false | ||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) { | ||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){ | ||
canSubmit = true | ||
} | ||
} | ||
return canSubmit | ||
} | ||
|
||
onTriggered: { | ||
submitRequest(uigraph.selectedNodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
enabled: { | ||
var canCompute = false | ||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) { | ||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i))%2 == 1){ | |
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) % 2 == 1) { |
enabled: { | ||
var canSubmit = false | ||
for (var i = 0; i < uigraph.selectedNodes.count; ++i) { | ||
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1){ | |
if (uigraph.graph.canCompute(uigraph.selectedNodes.at(i)) && uigraph.graph.canSubmitOrCompute(uigraph.selectedNodes.at(i)) > 1) { |
Description
With this feature, it is possible to submit or compute the current selected nodes even if they are not next to each other. The dependencies are defined separately to then create the tasks.