Skip to content

Commit 3e6aabc

Browse files
committed
[qml] Handle cases where a chunk is undefined
1 parent b7716ef commit 3e6aabc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

meshroom/ui/qml/GraphEditor/NodeStatus.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ FocusScope {
2222
clip: true
2323
anchors.fill: parent
2424

25-
property string currentFile: (root.currentChunkIndex >= 0) ? root.currentChunk["statusFile"] : ""
25+
property string currentFile: (root.currentChunkIndex >= 0 && root.currentChunk !== undefined) ? root.currentChunk["statusFile"] : ""
2626
property url sourceFile: Filepath.stringToUrl(currentFile)
2727

2828
sourceComponent: statViewerComponent
@@ -90,7 +90,7 @@ FocusScope {
9090

9191
delegate: Rectangle {
9292
color: activePalette.window
93-
width: parent.width
93+
width: statusListView.width
9494
height: childrenRect.height
9595
RowLayout {
9696
width: parent.width

meshroom/ui/qml/Utils/Colors.qml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ QtObject {
4848
]
4949

5050
function getChunkColor(chunk, overrides) {
51+
if (chunk === undefined)
52+
return "transparent"
5153
if (overrides && chunk.statusName in overrides) {
5254
return overrides[chunk.statusName]
5355
} else if (chunk.execModeName === "EXTERN" && chunk.statusName in statusColorsExternOverrides) {

0 commit comments

Comments
 (0)