Skip to content

Commit fa19f5d

Browse files
authored
Merge pull request #1032 from Ultimaker/CURA-12853-add-message-painting-in-compatibility-mode
CURA-12853 Set tooltip for unavailable selection by face instead of hide
2 parents e2ac818 + 0119413 commit fa19f5d

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

plugins/Tools/RotateTool/RotateTool.qml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,17 @@ Item
9191
anchors.leftMargin: UM.Theme.getSize("default_margin").width
9292
width: visible ? UM.Theme.getIcon("LayFlatOnFace").width : 0
9393

94-
text: catalog.i18nc("@action:button", "Select face to align to the build plate")
94+
text:
95+
{
96+
if (UM.Controller.properties.getValue("SelectFaceSupported"))
97+
{
98+
return catalog.i18nc("@action:button", "Select face to align to the build plate");
99+
}
100+
else
101+
{
102+
return catalog.i18nc("@action:button", "Alignment by face is not available on this device. Your graphics card or drivers do not fully support it. Updating your graphics drivers may enable this feature.");
103+
}
104+
}
95105

96106
toolItem: UM.ColorImage
97107
{
@@ -101,11 +111,10 @@ Item
101111

102112
checkable: true
103113

104-
enabled: UM.Selection.selectionCount == 1
114+
// Property might be undefined when we're switching away from the RotateTool!
115+
enabled: UM.Selection.selectionCount === 1 && UM.Controller.properties.getValue("SelectFaceSupported") === true
105116
checked: UM.Controller.properties.getValue("SelectFaceToLayFlatMode")
106117
onClicked: UM.Controller.setProperty("SelectFaceToLayFlatMode", checked)
107-
108-
visible: UM.Controller.properties.getValue("SelectFaceSupported") == true //Might be undefined if we're switching away from the RotateTool!
109118
}
110119

111120
Grid

0 commit comments

Comments
 (0)