mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Fix activating (quality)profiles on the profiles page
CURA-1278
This commit is contained in:
parent
581b9ce11f
commit
b1419d8028
1 changed files with 4 additions and 1 deletions
|
@ -6,6 +6,7 @@ import QtQuick.Controls 1.1
|
||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
|
|
||||||
import UM 1.2 as UM
|
import UM 1.2 as UM
|
||||||
|
import Cura 1.0 as Cura
|
||||||
|
|
||||||
UM.ManagementPage
|
UM.ManagementPage
|
||||||
{
|
{
|
||||||
|
@ -16,6 +17,7 @@ UM.ManagementPage
|
||||||
|
|
||||||
model: UM.InstanceContainersModel { filter: { "type": "quality" } }
|
model: UM.InstanceContainersModel { filter: { "type": "quality" } }
|
||||||
|
|
||||||
|
onActivateObject: Cura.MachineManager.setActiveQuality(currentItem.id)
|
||||||
onAddObject: {
|
onAddObject: {
|
||||||
var selectedProfile;
|
var selectedProfile;
|
||||||
if (objectList.currentIndex == 0) {
|
if (objectList.currentIndex == 0) {
|
||||||
|
@ -33,6 +35,7 @@ UM.ManagementPage
|
||||||
onRemoveObject: confirmDialog.open();
|
onRemoveObject: confirmDialog.open();
|
||||||
onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); }
|
onRenameObject: { renameDialog.removeWhenRejected = false; renameDialog.open(); renameDialog.selectText(); }
|
||||||
|
|
||||||
|
activateEnabled: currentItem != null ? currentItem.id != Cura.MachineManager.activeQualityId : false;
|
||||||
addEnabled: currentItem != null;
|
addEnabled: currentItem != null;
|
||||||
removeEnabled: currentItem != null ? !currentItem.readOnly : false;
|
removeEnabled: currentItem != null ? !currentItem.readOnly : false;
|
||||||
renameEnabled: currentItem != null ? !currentItem.readOnly : false;
|
renameEnabled: currentItem != null ? !currentItem.readOnly : false;
|
||||||
|
@ -69,7 +72,7 @@ UM.ManagementPage
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
visible: base.currentItem.id == -1 || base.currentItem.active
|
visible: base.currentItem.id == -1 || currentItem.id == Cura.MachineManager.activeQualityId
|
||||||
Button
|
Button
|
||||||
{
|
{
|
||||||
text: {
|
text: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue