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:
authorGhostkeeper <rubend@tutanota.com>2020-08-20 17:01:46 +0300
committerGhostkeeper <rubend@tutanota.com>2020-08-20 17:01:46 +0300
commit28f4d8513db7efce17bfd8b80fa7c8b237fd1c18 (patch)
treef483b9438afaa4c8560ad502764c0c73bce87efd /plugins/3MFReader/WorkspaceDialog.qml
parent2fe9ee2cf21a158ec1222474b5880d0f7ba23e63 (diff)
Revert "Merge branch '4.7' of github.com:Ultimaker/Cura into 4.7"
This reverts commit 7f47f12bf0a9cf305542b6c21600ce9b804c1dfd, reversing changes made to dd42c87da762d2030ee2220bc6f0a3e44cf85c28.
Diffstat (limited to 'plugins/3MFReader/WorkspaceDialog.qml')
-rw-r--r--plugins/3MFReader/WorkspaceDialog.qml65
1 files changed, 23 insertions, 42 deletions
diff --git a/plugins/3MFReader/WorkspaceDialog.qml b/plugins/3MFReader/WorkspaceDialog.qml
index 5f67f54c39..d0fd3d0846 100644
--- a/plugins/3MFReader/WorkspaceDialog.qml
+++ b/plugins/3MFReader/WorkspaceDialog.qml
@@ -2,7 +2,7 @@
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10
-import QtQuick.Controls 2.3
+import QtQuick.Controls 1.4
import QtQuick.Layouts 1.3
import QtQuick.Window 2.2
@@ -20,7 +20,6 @@ UM.Dialog
property int comboboxHeight: 15 * screenScaleFactor
property int spacerHeight: 10 * screenScaleFactor
- property int doubleSpacerHeight: 20 * screenScaleFactor
onClosing: manager.notifyClosed()
onVisibleChanged:
@@ -36,7 +35,7 @@ UM.Dialog
Item
{
anchors.fill: parent
- anchors.margins: 10 * screenScaleFactor
+ anchors.margins: 20 * screenScaleFactor
UM.I18nCatalog
{
@@ -80,7 +79,7 @@ UM.Dialog
}
Item // Spacer
{
- height: doubleSpacerHeight
+ height: spacerHeight
width: height
}
@@ -102,54 +101,36 @@ UM.Dialog
}
UM.TooltipArea
{
- id: machineResolveStrategyTooltip
+ id: machineResolveTooltip
width: (parent.width / 3) | 0
height: visible ? comboboxHeight : 0
- visible: base.visible && machineResolveComboBox.model.count > 1
+ visible: manager.machineConflict
text: catalog.i18nc("@info:tooltip", "How should the conflict in the machine be resolved?")
ComboBox
{
- id: machineResolveComboBox
- model: manager.updatableMachinesModel
- visible: machineResolveStrategyTooltip.visible
- textRole: "displayName"
- width: parent.width
- onCurrentIndexChanged:
+ model: ListModel
{
- if (model.getItem(currentIndex).id == "new"
- && model.getItem(currentIndex).type == "default_option")
- {
- manager.setResolveStrategy("machine", "new")
- }
- else
+ Component.onCompleted:
{
- manager.setResolveStrategy("machine", "override")
- manager.setMachineToOverride(model.getItem(currentIndex).id)
+ append({"key": "override", "label": catalog.i18nc("@action:ComboBox option", "Update") + " " + manager.machineName});
+ append({"key": "new", "label": catalog.i18nc("@action:ComboBox option", "Create new")});
}
}
-
- onVisibleChanged:
+ Connections
{
- if (!visible) {return}
-
- currentIndex = 0
- // If the project printer exists in Cura, set it as the default dropdown menu option.
- // No need to check object 0, which is the "Create new" option
- for (var i = 1; i < model.count; i++)
- {
- if (model.getItem(i).name == manager.machineName)
- {
- currentIndex = i
- break
- }
- }
- // The project printer does not exist in Cura. If there is at least one printer of the same
- // type, select the first one, else set the index to "Create new"
- if (currentIndex == 0 && model.count > 1)
+ target: manager
+ onMachineNameChanged:
{
- currentIndex = 1
+ machineResolveComboBox.model.get(0).label = catalog.i18nc("@action:ComboBox option", "Update") + " " + manager.machineName;
}
}
+ textRole: "label"
+ id: machineResolveComboBox
+ width: parent.width
+ onActivated:
+ {
+ manager.setResolveStrategy("machine", resolveStrategiesModel.get(index).key)
+ }
}
}
}
@@ -187,7 +168,7 @@ UM.Dialog
Item // Spacer
{
- height: doubleSpacerHeight
+ height: spacerHeight
width: height
}
Row
@@ -290,7 +271,7 @@ UM.Dialog
}
Item // Spacer
{
- height: doubleSpacerHeight
+ height: spacerHeight
width: height
}
Row
@@ -352,7 +333,7 @@ UM.Dialog
Item // Spacer
{
- height: doubleSpacerHeight
+ height: spacerHeight
width: height
}