Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/PrepareStage')
-rw-r--r--plugins/PrepareStage/PrepareMenu.qml9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/PrepareStage/PrepareMenu.qml b/plugins/PrepareStage/PrepareMenu.qml
index 576cd3cd95..219979407b 100644
--- a/plugins/PrepareStage/PrepareMenu.qml
+++ b/plugins/PrepareStage/PrepareMenu.qml
@@ -13,6 +13,8 @@ Item
{
id: prepareMenu
+ property var fileProviderModel: CuraApplication.getFileProviderModel()
+
UM.I18nCatalog
{
id: catalog
@@ -78,6 +80,8 @@ Item
Cura.ExpandablePopup
{
id: openFileMenu
+ visible: prepareMenu.fileProviderModel.count > 1
+
contentAlignment: Cura.ExpandablePopup.ContentAlignment.AlignLeft
headerCornerSide: Cura.RoundedRectangle.Direction.All
headerPadding: Math.round((parent.height - UM.Theme.getSize("button_icon").height) / 2)
@@ -107,11 +111,12 @@ Item
Button
{
id: openFileButton
+ visible: prepareMenu.fileProviderModel.count <= 1
height: parent.height
- width: height //Square button.
+ width: visible ? height : 0 //Square button (and don't take up space if invisible).
onClicked: Cura.Actions.open.trigger()
- enabled: visible
+ enabled: visible && prepareMenu.fileProviderModel.count > 0
hoverEnabled: true
contentItem: Item