mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:19:13 +08:00
Blur setting text fields when clicking buttons
Otherwise the setting is not applied yet by the time you duplicate or export a profile. Contributes to issue CURA-4011.
This commit is contained in:
parent
0ad7096782
commit
9dd3527504
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2016 Ultimaker B.V.
|
//Copyright (c) 2017 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the AGPLv3 or higher.
|
//Cura is released under the terms of the AGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.1
|
import QtQuick 2.1
|
||||||
import QtQuick.Controls 1.1
|
import QtQuick.Controls 1.1
|
||||||
@ -139,6 +139,7 @@ UM.ManagementPage
|
|||||||
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId && Cura.MachineManager.hasMaterials
|
enabled: base.currentItem != null && base.currentItem.id != Cura.MachineManager.activeMaterialId && Cura.MachineManager.hasMaterials
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
forceActiveFocus();
|
||||||
Cura.MachineManager.setActiveMaterial(base.currentItem.id)
|
Cura.MachineManager.setActiveMaterial(base.currentItem.id)
|
||||||
currentItem = base.model.getItem(base.objectList.currentIndex) // Refresh the current item.
|
currentItem = base.model.getItem(base.objectList.currentIndex) // Refresh the current item.
|
||||||
}
|
}
|
||||||
@ -149,6 +150,7 @@ UM.ManagementPage
|
|||||||
iconName: "list-add"
|
iconName: "list-add"
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
forceActiveFocus();
|
||||||
var material_id = Cura.ContainerManager.createMaterial()
|
var material_id = Cura.ContainerManager.createMaterial()
|
||||||
if(material_id == "")
|
if(material_id == "")
|
||||||
{
|
{
|
||||||
@ -168,6 +170,7 @@ UM.ManagementPage
|
|||||||
enabled: base.currentItem != null
|
enabled: base.currentItem != null
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
forceActiveFocus();
|
||||||
var base_file = Cura.ContainerManager.getContainerMetaDataEntry(base.currentItem.id, "base_file")
|
var base_file = Cura.ContainerManager.getContainerMetaDataEntry(base.currentItem.id, "base_file")
|
||||||
// We need to copy the base container instead of the specific variant.
|
// We need to copy the base container instead of the specific variant.
|
||||||
var material_id = base_file == "" ? Cura.ContainerManager.duplicateMaterial(base.currentItem.id): Cura.ContainerManager.duplicateMaterial(base_file)
|
var material_id = base_file == "" ? Cura.ContainerManager.duplicateMaterial(base.currentItem.id): Cura.ContainerManager.duplicateMaterial(base_file)
|
||||||
@ -187,20 +190,32 @@ UM.ManagementPage
|
|||||||
text: catalog.i18nc("@action:button", "Remove");
|
text: catalog.i18nc("@action:button", "Remove");
|
||||||
iconName: "list-remove";
|
iconName: "list-remove";
|
||||||
enabled: base.currentItem != null && !base.currentItem.readOnly && !Cura.ContainerManager.isContainerUsed(base.currentItem.id)
|
enabled: base.currentItem != null && !base.currentItem.readOnly && !Cura.ContainerManager.isContainerUsed(base.currentItem.id)
|
||||||
onClicked: confirmDialog.open()
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
confirmDialog.open();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Import");
|
text: catalog.i18nc("@action:button", "Import");
|
||||||
iconName: "document-import";
|
iconName: "document-import";
|
||||||
onClicked: importDialog.open();
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
importDialog.open();
|
||||||
|
}
|
||||||
visible: true;
|
visible: true;
|
||||||
},
|
},
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: catalog.i18nc("@action:button", "Export")
|
text: catalog.i18nc("@action:button", "Export")
|
||||||
iconName: "document-export"
|
iconName: "document-export"
|
||||||
onClicked: exportDialog.open()
|
onClicked:
|
||||||
|
{
|
||||||
|
forceActiveFocus();
|
||||||
|
exportDialog.open();
|
||||||
|
}
|
||||||
enabled: currentItem != null
|
enabled: currentItem != null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user