mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-29 00:46:32 +02:00
[ui] hide 'Submit' button if no submitter available
This commit is contained in:
parent
f798050799
commit
72a657ec48
2 changed files with 5 additions and 1 deletions
|
@ -11,6 +11,7 @@ from meshroom.common.qt import QObjectListModel
|
||||||
from meshroom.core.attribute import Attribute, ListAttribute
|
from meshroom.core.attribute import Attribute, ListAttribute
|
||||||
from meshroom.core.graph import Graph, Edge, submitGraph, executeGraph
|
from meshroom.core.graph import Graph, Edge, submitGraph, executeGraph
|
||||||
from meshroom.core.node import NodeChunk, Node, Status, CompatibilityNode, Position
|
from meshroom.core.node import NodeChunk, Node, Status, CompatibilityNode, Position
|
||||||
|
from meshroom.core import submitters
|
||||||
from meshroom.ui import commands
|
from meshroom.ui import commands
|
||||||
from meshroom.ui.utils import makeProperty
|
from meshroom.ui.utils import makeProperty
|
||||||
|
|
||||||
|
@ -475,6 +476,7 @@ class UIGraph(QObject):
|
||||||
computing = Property(bool, isComputing, notify=computeStatusChanged)
|
computing = Property(bool, isComputing, notify=computeStatusChanged)
|
||||||
computingExternally = Property(bool, isComputingExternally, notify=computeStatusChanged)
|
computingExternally = Property(bool, isComputingExternally, notify=computeStatusChanged)
|
||||||
computingLocally = Property(bool, isComputingLocally, notify=computeStatusChanged)
|
computingLocally = Property(bool, isComputingLocally, notify=computeStatusChanged)
|
||||||
|
canSubmit = Property(bool, lambda self: len(submitters), constant=True)
|
||||||
|
|
||||||
sortedDFSChunks = Property(QObject, lambda self: self._sortedDFSChunks, constant=True)
|
sortedDFSChunks = Property(QObject, lambda self: self._sortedDFSChunks, constant=True)
|
||||||
lockedChanged = Signal()
|
lockedChanged = Signal()
|
||||||
|
|
|
@ -358,7 +358,8 @@ ApplicationWindow {
|
||||||
&& _reconstruction.graph.canComputeLeaves // graph has no uncomputable nodes
|
&& _reconstruction.graph.canComputeLeaves // graph has no uncomputable nodes
|
||||||
|
|
||||||
// evaluate if graph computation can be submitted externally
|
// evaluate if graph computation can be submitted externally
|
||||||
property bool canSubmit: canStartComputation // can be computed
|
property bool canSubmit: _reconstruction.canSubmit // current setup allows to compute externally
|
||||||
|
&& canStartComputation // can be computed
|
||||||
&& _reconstruction.graph.filepath // graph is saved on disk
|
&& _reconstruction.graph.filepath // graph is saved on disk
|
||||||
|
|
||||||
// disable controls if graph is executed externally
|
// disable controls if graph is executed externally
|
||||||
|
@ -381,6 +382,7 @@ ApplicationWindow {
|
||||||
}
|
}
|
||||||
Item { width: 20; height: 1 }
|
Item { width: 20; height: 1 }
|
||||||
Button {
|
Button {
|
||||||
|
visible: _reconstruction.canSubmit
|
||||||
enabled: parent.canSubmit
|
enabled: parent.canSubmit
|
||||||
text: "Submit"
|
text: "Submit"
|
||||||
onClicked: _reconstruction.submit(null)
|
onClicked: _reconstruction.submit(null)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue