mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-09 11:19:01 +08:00
Active quality is now displayed (and changable) again
CURA-1278
This commit is contained in:
parent
59ec593db5
commit
12fd002e67
@ -6,7 +6,8 @@ import QtQuick.Controls 1.1
|
||||
import QtQuick.Controls.Styles 1.1
|
||||
import QtQuick.Layouts 1.1
|
||||
|
||||
import UM 1.1 as UM
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
|
||||
Item{
|
||||
id: base;
|
||||
@ -41,13 +42,13 @@ Item{
|
||||
property int rightMargin: customisedSettings.visible ? customisedSettings.width + UM.Theme.getSize("default_margin").width / 2 : 0
|
||||
|
||||
id: globalProfileSelection
|
||||
text: UM.MachineManager.activeProfile
|
||||
text: Cura.MachineManager.activeQualityName
|
||||
width: parent.width/100*55
|
||||
height: UM.Theme.getSize("setting_control").height
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
tooltip: UM.MachineManager.activeProfile
|
||||
tooltip: Cura.MachineManager.activeQualityName
|
||||
style: UM.Theme.styles.sidebar_header_button
|
||||
|
||||
menu: Menu
|
||||
@ -56,7 +57,10 @@ Item{
|
||||
Instantiator
|
||||
{
|
||||
id: profileSelectionInstantiator
|
||||
// model: UM.ProfilesModel {}
|
||||
model: UM.InstanceContainersModel
|
||||
{
|
||||
filter: {"type": "quality"}
|
||||
}
|
||||
property int separatorIndex: -1
|
||||
|
||||
Loader {
|
||||
@ -98,18 +102,18 @@ Item{
|
||||
id: item
|
||||
text: model_data ? model_data.name : ""
|
||||
checkable: true;
|
||||
checked: model_data ? model_data.active : false;
|
||||
checked: Cura.MachineManager.activeQualityId == model_data.id
|
||||
exclusiveGroup: profileSelectionMenuGroup;
|
||||
onTriggered:
|
||||
{
|
||||
UM.MachineManager.setActiveProfile(model_data.name);
|
||||
if (!model_data.active) {
|
||||
Cura.MachineManager.setActiveQuality(model_data.id);
|
||||
/*if (!model_data.active) {
|
||||
//Selecting a profile was canceled; undo menu selection
|
||||
profileSelectionInstantiator.model.setProperty(model_index, "active", false);
|
||||
var activeProfileName = UM.MachineManager.activeProfile;
|
||||
var activeProfileIndex = profileSelectionInstantiator.model.find("name", activeProfileName);
|
||||
profileSelectionInstantiator.model.setProperty(activeProfileIndex, "active", true);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user