mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -06:00
Merge branch '5.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
7265509054
19 changed files with 40 additions and 28 deletions
|
@ -119,8 +119,8 @@ Item
|
|||
topPadding: UM.Theme.getSize("narrow_margin").width
|
||||
bottomPadding: UM.Theme.getSize("narrow_margin").width
|
||||
|
||||
Layout.preferredWidth: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||
Layout.preferredHeight: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||
width: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||
height: UM.Theme.getSize("card_tiny_icon").width + 2 * padding
|
||||
contentItem: UM.ColorImage
|
||||
{
|
||||
source: UM.Theme.getIcon("LinkExternal")
|
||||
|
|
|
@ -232,7 +232,7 @@ UM.Dialog
|
|||
}
|
||||
|
||||
onObjectAdded: function(index, object) { scriptsMenu.insertItem(index, object)}
|
||||
onObjectRemoved: function(object) { scriptsMenu.removeItem(object) }
|
||||
onObjectRemoved: function(index, object) { scriptsMenu.removeItem(object) }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -155,6 +155,7 @@ Button
|
|||
height: parent.height
|
||||
|
||||
visible: false
|
||||
running: visible
|
||||
|
||||
RotationAnimator
|
||||
{
|
||||
|
|
|
@ -46,7 +46,7 @@ Cura.Menu
|
|||
}
|
||||
// Add it to the fifth position (and above) as we want it to be added after the extruder header.
|
||||
onObjectAdded: function(index, object) { base.insertItem(index + 5, object) }
|
||||
onObjectRemoved: function(object) { base.removeItem(object) }
|
||||
onObjectRemoved: function(index, object) { base.removeItem(object) }
|
||||
}
|
||||
|
||||
// Global actions
|
||||
|
@ -134,6 +134,7 @@ Cura.Menu
|
|||
from: 1
|
||||
to: 99
|
||||
width: 2 * UM.Theme.getSize("button").width
|
||||
value: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,11 +54,11 @@ Cura.Menu
|
|||
}
|
||||
|
||||
onObjectAdded: function(index, object) { sub_menu.insertItem(index, object.item)}
|
||||
onObjectRemoved: function(object) { sub_menu.removeItem(object.item)}
|
||||
onObjectRemoved: function(index, object) { sub_menu.removeItem(object.item)}
|
||||
}
|
||||
}
|
||||
|
||||
onObjectAdded: function(index, object) { extensionMenu.insertMenu(index, object) }
|
||||
onObjectRemoved: function(object) { extensionMenu.removeMenu(object)}
|
||||
onObjectRemoved: function(index, object) { extensionMenu.removeMenu(object)}
|
||||
}
|
||||
}
|
|
@ -33,6 +33,7 @@ Cura.Menu
|
|||
id: openFilesMenu
|
||||
|
||||
shouldBeVisible: base.fileProviderModel.count > 1
|
||||
enabled: shouldBeVisible
|
||||
}
|
||||
|
||||
RecentFilesMenu { }
|
||||
|
|
|
@ -67,7 +67,7 @@ Cura.Menu
|
|||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
}
|
||||
onObjectAdded: function(index, object) { materialMenu.insertItem(index + 1, object) }
|
||||
onObjectRemoved: function(object) { materialMenu.removeItem(index) }
|
||||
onObjectRemoved: function(index, object) { materialMenu.removeItem(index) }
|
||||
}
|
||||
|
||||
Cura.MenuSeparator { visible: favoriteMaterialsModel.items.length > 0}
|
||||
|
@ -89,7 +89,7 @@ Cura.Menu
|
|||
onTriggered: Cura.MachineManager.setMaterial(extruderIndex, model.container_node)
|
||||
}
|
||||
onObjectAdded: function(index, object) { genericMenu.insertItem(index, object)}
|
||||
onObjectRemoved: function(object) {genericMenu.removeItem(index) }
|
||||
onObjectRemoved: function(index, object) {genericMenu.removeItem(index) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -103,7 +103,7 @@ Cura.Menu
|
|||
materialTypesModel: model
|
||||
}
|
||||
onObjectAdded: function(index, object) { materialMenu.insertItem(index + 4, object)}
|
||||
onObjectRemoved: function(object) { materialMenu.removeItem(index) }
|
||||
onObjectRemoved: function(index, object) { materialMenu.removeItem(index) }
|
||||
}
|
||||
|
||||
Cura.MenuSeparator {}
|
||||
|
|
|
@ -50,7 +50,7 @@ Cura.Menu
|
|||
}
|
||||
|
||||
onObjectAdded: function(index, object) { nozzleMenu.insertItem(index, object) }
|
||||
onObjectRemoved: function(object) {nozzleMenu.removeItem(object)}
|
||||
onObjectRemoved: function(index, object) {nozzleMenu.removeItem(object)}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,6 +36,6 @@ Cura.Menu
|
|||
}
|
||||
onObjectAdded: function(index, object) { openFilesMenu.insertItem(index, object)}
|
||||
|
||||
onObjectRemoved: function(object) { openFilesMenu.removeItem(object) }
|
||||
onObjectRemoved: function(index, object) { openFilesMenu.removeItem(object) }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ Cura.Menu
|
|||
onTriggered: Cura.MachineManager.setActiveMachine(model.id)
|
||||
}
|
||||
onObjectAdded: function(index, object) { menu.insertItem(2, object)}
|
||||
onObjectRemoved: function(object) { menu.removeItem(object)}
|
||||
onObjectRemoved: function(index, object) { menu.removeItem(object)}
|
||||
}
|
||||
|
||||
Cura.MenuSeparator { visible: networKPrinterInstantiator.count > 0 }
|
||||
|
@ -67,7 +67,7 @@ Cura.Menu
|
|||
}
|
||||
// A bit hackish, but we have 2 items at the end, put them before that
|
||||
onObjectAdded: function(index, object) { menu.insertItem(menu.count - 2, object) }
|
||||
onObjectRemoved: function(object) { menu.removeItem(object) }
|
||||
onObjectRemoved: function(index, object) { menu.removeItem(object) }
|
||||
}
|
||||
|
||||
Cura.MenuSeparator { visible: localPrinterInstantiator.count > 0 }
|
||||
|
|
|
@ -29,6 +29,6 @@ Cura.Menu
|
|||
}
|
||||
}
|
||||
onObjectAdded: function(index, object) { return menu.insertItem(index, object); }
|
||||
onObjectRemoved: function(object) { return menu.removeItem(object); }
|
||||
onObjectRemoved: function(index, object) { return menu.removeItem(object); }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ Cura.Menu
|
|||
enabled: saveProjectMenu.shouldBeVisible
|
||||
}
|
||||
onObjectAdded: function(index, object) { saveProjectMenu.insertItem(index, object)}
|
||||
onObjectRemoved: function(object) { saveProjectMenu.removeItem(object)}
|
||||
onObjectRemoved: function(index, object) { saveProjectMenu.removeItem(object)}
|
||||
}
|
||||
|
||||
WorkspaceSummaryDialog
|
||||
|
|
|
@ -33,7 +33,7 @@ Cura.Menu
|
|||
}
|
||||
|
||||
onObjectAdded: function(index, object) { menu.insertItem(index, object) }
|
||||
onObjectRemoved: function(object) { menu.removeItem(object)}
|
||||
onObjectRemoved: function(index, object) { menu.removeItem(object)}
|
||||
}
|
||||
|
||||
Cura.MenuSeparator {}
|
||||
|
|
|
@ -68,7 +68,7 @@ Cura.Menu
|
|||
}
|
||||
}
|
||||
onObjectAdded: function(index, object) { base.insertMenu(index, object) }
|
||||
onObjectRemoved:function(object) { base.removeMenu(object)}
|
||||
onObjectRemoved: function(index, object) { base.removeMenu(object);}
|
||||
}
|
||||
|
||||
Cura.MenuSeparator { }
|
||||
|
|
|
@ -246,7 +246,7 @@ UM.ManagementPage
|
|||
break;
|
||||
}
|
||||
messageDialog.open();
|
||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
||||
CuraApplication.setDefaultPath("dialog_material_path", currentFolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -259,7 +259,9 @@ UM.ManagementPage
|
|||
currentFolder: CuraApplication.getDefaultPath("dialog_material_path")
|
||||
onAccepted:
|
||||
{
|
||||
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, selectedNameFilter, selectedFile);
|
||||
const nameFilterString = selectedNameFilter.index >= 0 ? nameFilters[selectedNameFilter.index] : nameFilters[0];
|
||||
|
||||
const result = Cura.ContainerManager.exportContainer(base.currentItem.root_material_id, nameFilterString, selectedFile);
|
||||
|
||||
const messageDialog = Qt.createQmlObject("import Cura 1.5 as Cura; Cura.MessageDialog { onClosed: destroy() }", base);
|
||||
messageDialog.title = catalog.i18nc("@title:window", "Export Material");
|
||||
|
@ -275,7 +277,7 @@ UM.ManagementPage
|
|||
}
|
||||
messageDialog.open();
|
||||
|
||||
CuraApplication.setDefaultPath("dialog_material_path", folder);
|
||||
CuraApplication.setDefaultPath("dialog_material_path", currentFolder);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -574,11 +574,11 @@ Item
|
|||
elide: Text.ElideRight
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
}
|
||||
Cura.SpinBox
|
||||
Cura.NumericTextFieldWithUnit
|
||||
{
|
||||
id: spinBox
|
||||
anchors.left: label.right
|
||||
value:
|
||||
valueText:
|
||||
{
|
||||
// In case the setting is not in the material...
|
||||
if (!isNaN(parseFloat(materialPropertyProvider.properties.value)))
|
||||
|
@ -598,11 +598,11 @@ Item
|
|||
return 0;
|
||||
}
|
||||
width: settingsPage.columnWidth
|
||||
suffix: " " + model.unit
|
||||
to: 99999
|
||||
maximum: 99999
|
||||
unitText: model.unit
|
||||
decimals: model.unit == "mm" ? 2 : 0
|
||||
|
||||
onEditingFinished: materialPropertyProvider.setPropertyValue("value", value)
|
||||
editingFinishedFunction: materialPropertyProvider.setPropertyValue("value", value)
|
||||
}
|
||||
|
||||
UM.ContainerPropertyProvider
|
||||
|
|
|
@ -354,8 +354,13 @@ UM.ManagementPage
|
|||
currentFolder: CuraApplication.getDefaultPath("dialog_profile_path")
|
||||
onAccepted:
|
||||
{
|
||||
|
||||
// If nameFilters contains only 1 item, the index of selectedNameFilter will always be -1
|
||||
// This fetches the nameFilter at index selectedNameFilter.index if it is positive
|
||||
const nameFilterString = selectedNameFilter.index >= 0 ? nameFilters[selectedNameFilter.index] : nameFilters[0];
|
||||
|
||||
var result = Cura.ContainerManager.exportQualityChangesGroup(base.currentItem.quality_changes_group,
|
||||
selectedFile, selectedNameFilter);
|
||||
selectedFile, nameFilterString);
|
||||
|
||||
if (result && result.status == "error")
|
||||
{
|
||||
|
@ -365,7 +370,7 @@ UM.ManagementPage
|
|||
}
|
||||
|
||||
// else pop-up Message thing from python code
|
||||
CuraApplication.setDefaultPath("dialog_profile_path", folder);
|
||||
CuraApplication.setDefaultPath("dialog_profile_path", currentFolder);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,8 @@ UM.PointingRectangle
|
|||
arrowSize: UM.Theme.getSize("default_arrow").width
|
||||
|
||||
opacity: 0
|
||||
// This should be disabled when invisible, otherwise it will catch mouse events.
|
||||
enabled: opacity > 0
|
||||
|
||||
Behavior on opacity
|
||||
{
|
||||
|
|
|
@ -154,7 +154,7 @@ SettingItem
|
|||
background: Rectangle
|
||||
{
|
||||
id: swatch
|
||||
height: Math.round(parent.height / 2)
|
||||
height: UM.Theme.getSize("standard_arrow").width
|
||||
width: height
|
||||
radius: Math.round(width / 2)
|
||||
anchors.right: parent.right
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue