File tree Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Expand file tree Collapse file tree 5 files changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ class Status(Enum):
5050 STOPPED = 4
5151 KILLED = 5
5252 SUCCESS = 6
53- # SKIPPED = 7
5453 INPUT = 7 # Special status for input nodes
5554
5655
@@ -2211,6 +2210,7 @@ def _resetChunks(self):
22112210 # TODO : Maybe don't delete chunks if we will recreate them as before ?
22122211 """
22132212 if isinstance (self .nodeDesc , desc .InputNode ):
2213+ self ._chunksCreated = True
22142214 return
22152215 # Disconnect signals
22162216 for chunk in self ._chunks :
@@ -2219,8 +2219,10 @@ def _resetChunks(self):
22192219 self ._chunks .setObjectList ([])
22202220 # Recreate list with reset values (1 chunk or the static size)
22212221 if not self .isParallelized :
2222- self ._chunksCreated = True
22232222 self .setSize (1 )
2223+ self ._chunks .setObjectList ([NodeChunk (self , desc .Range ())])
2224+ self ._chunks [0 ].statusChanged .connect (self .globalStatusChanged )
2225+ self ._chunksCreated = True
22242226 elif isinstance (self .nodeDesc .size , desc .computation .StaticNodeSize ):
22252227 self ._chunksCreated = True
22262228 self .setSize (self .nodeDesc .size .computeSize (self ))
Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ Item {
496496 // Node Chunks
497497 NodeChunks {
498498 visible: node .isComputableType
499- nodeStatus : node ? node . globalStatus : " NONE "
499+ targetNode : node
500500 defaultColor: Colors .sysPalette .mid
501501 implicitHeight: 3
502502 width: parent .width
Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ ListView {
99
1010 SystemPalette { id: activePalette }
1111
12- property string nodeStatus: " NONE"
12+ property var targetNode: null
13+
1314 property color defaultColor: Qt .darker (activePalette .window , 1.1 )
1415 property real chunkHeight: height
1516 property int modelSize: model ? model .count : 0
@@ -38,10 +39,14 @@ ListView {
3839 }
3940 }
4041
41- // Default rectangle shown when model is empty/undefined
42+ // Default rectangle shown when model is empty/undefined (= no chunks)
4243 Rectangle {
4344 anchors .fill : parent
44- color: nodeStatus == " NONE" ? Colors .darkpurple : Colors .statusColors [nodeStatus]
45+ color: root .targetNode !== null
46+ ? (root .targetNode .globalStatus === " NONE"
47+ ? Colors .darkpurple
48+ : Colors .statusColors [root .targetNode .globalStatus ])
49+ : " transparent"
4550 enabled: modelSize == 0
4651 visible: enabled
4752 }
Original file line number Diff line number Diff line change @@ -28,7 +28,8 @@ QtObject {
2828 " RUNNING" : orange,
2929 " ERROR" : red,
3030 " SUCCESS" : green,
31- " STOPPED" : pink
31+ " STOPPED" : pink,
32+ " INPUT" : " transparent"
3233 }
3334
3435 readonly property var ghostColors: {
Original file line number Diff line number Diff line change @@ -1031,7 +1031,8 @@ def _setSfm(self, node):
10311031 # disconnection step in 'setSfm' (at this point, 'self._sfm' underlying object
10321032 # has been destroyed and can't be evaluated anymore)
10331033 self ._sfm .destroyed .connect (self ._unsetSfm )
1034- self ._sfm .chunks [0 ].statusChanged .connect (self .updateSfMResults )
1034+ if len (self ._sfm ._chunks ) > 0 :
1035+ self ._sfm .chunks [0 ].statusChanged .connect (self .updateSfMResults )
10351036 self .sfmChanged .emit ()
10361037
10371038 def setSfm (self , node ):
You can’t perform that action at this time.
0 commit comments