mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 19:02:29 +02:00
Merge pull request #1839 from alicevision/dev/fixQmlWarnings
[ui] Fix all "TypeError" QML warnings
This commit is contained in:
commit
a2f559f48a
13 changed files with 103 additions and 90 deletions
|
@ -14,7 +14,7 @@ MessageDialog {
|
|||
// the UIGraph instance
|
||||
property var uigraph
|
||||
// alias to underlying compatibilityNodes model
|
||||
readonly property var nodesModel: uigraph.graph.compatibilityNodes
|
||||
readonly property var nodesModel: uigraph ? uigraph.graph.compatibilityNodes : undefined
|
||||
// the total number of compatibility issues
|
||||
readonly property int issueCount: (nodesModel != undefined) ? nodesModel.count : 0
|
||||
// the number of CompatibilityNodes that can be upgraded
|
||||
|
@ -47,7 +47,10 @@ MessageDialog {
|
|||
|
||||
title: "Compatibility issues detected"
|
||||
text: "This project contains " + issueCount + " node(s) incompatible with the current version of Meshroom."
|
||||
detailedText: "Project was created with Meshroom " + uigraph.graph.fileReleaseVersion + "."
|
||||
detailedText: {
|
||||
let releaseVersion = uigraph ? uigraph.graph.fileReleaseVersion : "0.0"
|
||||
return "Project was created with Meshroom " + releaseVersion + "."
|
||||
}
|
||||
|
||||
helperText: upgradableCount ?
|
||||
upgradableCount + " node(s) can be upgraded but this might invalidate already computed data.\n"
|
||||
|
|
|
@ -441,7 +441,7 @@ Item {
|
|||
MenuItem {
|
||||
text: "Submit"
|
||||
enabled: nodeMenu.canComputeNode && nodeMenu.canSubmitOrCompute > 1
|
||||
visible: uigraph.canSubmit
|
||||
visible: uigraph ? uigraph.canSubmit : false
|
||||
height: visible ? implicitHeight : 0
|
||||
onTriggered: submitRequest(nodeMenu.currentNode)
|
||||
}
|
||||
|
@ -759,7 +759,7 @@ Item {
|
|||
flat: true
|
||||
model: ['Minimum', 'Maximum']
|
||||
implicitWidth: 80
|
||||
currentIndex: uigraph.layout.depthMode
|
||||
currentIndex: uigraph ? uigraph.layout.depthMode : -1
|
||||
onActivated: {
|
||||
uigraph.layout.depthMode = currentIndex
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ FocusScope {
|
|||
selectByMouse: true
|
||||
selectionColor: activePalette.highlight
|
||||
color: activePalette.text
|
||||
text: node.documentation
|
||||
text: node ? node.documentation : ""
|
||||
wrapMode: TextEdit.Wrap
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ Item {
|
|||
|
||||
TextMetrics {
|
||||
id: nbMetrics
|
||||
text: root.taskManager.nodes.count
|
||||
text: root.taskManager ? root.taskManager.nodes.count : "0"
|
||||
}
|
||||
|
||||
TextMetrics {
|
||||
|
@ -67,7 +67,7 @@ Item {
|
|||
anchors.fill: parent
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
|
||||
model: parent.taskManager.nodes
|
||||
model: parent.taskManager ? parent.taskManager.nodes : null
|
||||
spacing: 3
|
||||
|
||||
headerPositioning: ListView.OverlayHeader
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue