Skip to content

Commit 4b1226e

Browse files
authored
Merge pull request #2673 from alicevision/fix/chunksWarnings
[qml] Fix QML warnings related to chunks
2 parents 317bb65 + 3e6aabc commit 4b1226e

File tree

5 files changed

+6
-32
lines changed

5 files changed

+6
-32
lines changed

meshroom/ui/qml/GraphEditor/ChunksListView.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import QtQuick
22
import QtQuick.Controls
33
import QtQuick.Layouts
44

5-
import "common.js" as Common
5+
import Utils 1.0
66

77
/**
88
* ChunkListView
@@ -86,7 +86,7 @@ ColumnLayout {
8686
Rectangle {
8787
width: 4
8888
height: parent.height
89-
color: Common.getChunkColor(parent.chunk)
89+
color: Colors.getChunkColor(parent.chunk)
9090
}
9191
}
9292
}

meshroom/ui/qml/GraphEditor/NodeDocumentation.qml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ import QtQuick.Layouts
44

55
import Controls 1.0
66

7-
import "common.js" as Common
8-
97
/**
108
* Displays Node documentation
119
*/

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/GraphEditor/common.js

Lines changed: 0 additions & 26 deletions
This file was deleted.

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)