[ui] bugfix : external files now closable in Viewer

This commit is contained in:
Aurore LAFAURIE 2024-04-08 14:40:22 +02:00 committed by Candice Bentéjac
parent 2b2c5a1baf
commit 887537e8bc

View file

@ -732,15 +732,16 @@ FocusScope {
height: contentHeight
}
// button to clear currently displayed node
// button to clear currently displayed file
MaterialToolButton {
id: clearDisplayedNode
id: clearViewerButton
text: MaterialIcons.close
ToolTip.text: "Clear node"
enabled: root.displayedNode
visible: root.displayedNode
ToolTip.text: root.useExternal ? "Close external file" : "Clear node"
enabled: root.displayedNode || root.useExternal
visible: root.displayedNode || root.useExternal
onClicked: {
root.displayedNode = null
if (root.displayedNode) root.displayedNode = null
if (root.useExternal) root.useExternal = false
}
}
}