[ui] Viewer2D: hide the "Clear node" button when no node is displayed

If only images from the Image Gallery or from external sources are
displayed, no node is currently loaded and a "Clear node" button that
appears, although disabled, is unnecessary and might be confusing.
This commit hides it and only displays it again once it gets enabled.
This commit is contained in:
Candice Bentéjac 2022-11-22 13:14:39 +01:00
parent feee10e97d
commit cfa42438d4

View file

@ -665,6 +665,7 @@ FocusScope {
text: MaterialIcons.close
ToolTip.text: "Clear node"
enabled: root.displayedNode
visible: root.displayedNode
onClicked: {
root.displayedNode = null
}