Skip to content

Commit 11aae7e

Browse files
authored
Merge pull request #2756 from alicevision/fix/qmlWarning
[qml] Fix some minor QML warnings
2 parents f76821b + 27a815e commit 11aae7e

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

meshroom/ui/qml/Controls/TextFileViewer.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Item {
120120
keyNavigationEnabled: false
121121
highlightFollowsCurrentItem: true
122122
highlightMoveDuration: 0
123-
Keys.onPressed: {
123+
Keys.onPressed: function(event) {
124124
switch (event.key) {
125125
case Qt.Key_Home:
126126
textView.positionViewAtBeginning()

meshroom/ui/qml/GraphEditor/GraphEditor.qml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,12 @@ Item {
484484
property bool isValidEdge: src !== undefined && dst !== undefined
485485
visible: isValidEdge && src.visible && dst.visible
486486

487-
property bool forLoop: src.attribute.type === "ListAttribute" && dst.attribute.type != "ListAttribute"
487+
property bool forLoop: {
488+
if (src !== undefined && dst !== undefined) {
489+
return src.attribute.type === "ListAttribute" && dst.attribute.type != "ListAttribute"
490+
}
491+
return false
492+
}
488493

489494
property bool inFocus: containsMouse || (edgeMenu.opened && edgeMenu.currentEdge === edge)
490495

meshroom/ui/qml/ImageGallery/ImageGallery.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,9 @@ Panel {
674674
text: MaterialIcons.navigate_next
675675
property string nextGroupName: {
676676
if (root.cameraInits && root.cameraInitIndex + 1 < root.cameraInits.count) {
677-
return root.cameraInits.at(root.cameraInitIndex + 1).label
677+
var group = root.cameraInits.at(root.cameraInitIndex + 1)
678+
if (group)
679+
return root.cameraInits.at(root.cameraInitIndex + 1).label
678680
}
679681
return ""
680682
}

0 commit comments

Comments
 (0)