Skip to content

Commit d73997d

Browse files
committed
[qml] Fix anchor issue when chunks are emptied
1 parent a15aad5 commit d73997d

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

meshroom/ui/qml/GraphEditor/TaskManager.qml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,21 +252,23 @@ Item {
252252

253253
spacing: 3
254254

255-
delegate: Label {
255+
delegate: Loader {
256256
width: ListView.view.model ? (ListView.view.width / ListView.view.model.count) - 3 : 0
257257
height: ListView.view.height
258-
anchors.verticalCenter: parent.verticalCenter
259-
background: Rectangle {
260-
color: Colors.getChunkColor(object, {"NONE": bgColor})
261-
radius: 3
262-
border.width: 2
263-
border.color: chunkList.node === uigraph.selectedNode ? Colors.sysPalette.text : Colors.getChunkColor(object, {"NONE": bgColor})
264-
}
265-
266-
MouseArea {
258+
sourceComponent: Label {
267259
anchors.fill: parent
268-
onPressed: {
269-
selectNode(chunkList.node)
260+
background: Rectangle {
261+
color: Colors.getChunkColor(object, {"NONE": bgColor})
262+
radius: 3
263+
border.width: 2
264+
border.color: chunkList.node === uigraph.selectedNode ? Colors.sysPalette.text : "transparent"
265+
}
266+
267+
MouseArea {
268+
anchors.fill: parent
269+
onPressed: {
270+
selectNode(chunkList.node)
271+
}
270272
}
271273
}
272274
}

0 commit comments

Comments
 (0)