mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-29 22:01:14 -07:00
Ensure that each intent gets it's own bar in recommended
CURA-6598
This commit is contained in:
parent
24d6d5b102
commit
5401a4db15
3 changed files with 60 additions and 34 deletions
|
|
@ -7,7 +7,7 @@ import QtQuick.Controls 2.3 as Controls2
|
|||
import QtQuick.Controls.Styles 1.4
|
||||
|
||||
import UM 1.2 as UM
|
||||
import Cura 1.0 as Cura
|
||||
import Cura 1.6 as Cura
|
||||
|
||||
|
||||
//
|
||||
|
|
@ -98,7 +98,8 @@ Item
|
|||
{
|
||||
id: activeProfileButtonGroup
|
||||
exclusive: true
|
||||
onClicked: Cura.MachineManager.activeQualityGroup = button.identifier
|
||||
onClicked: Cura.IntentManager.selectIntent(button.modelData.intent_category, button.modelData.quality_type)
|
||||
|
||||
}
|
||||
|
||||
Cura.LabelBar
|
||||
|
|
@ -114,29 +115,32 @@ Item
|
|||
modelKey: "layer_height"
|
||||
}
|
||||
|
||||
Cura.RadioCheckbar
|
||||
Repeater
|
||||
{
|
||||
anchors
|
||||
model: Cura.IntentCategoryModel{}
|
||||
Cura.RadioCheckbar
|
||||
{
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
|
||||
model: Cura.QualityProfilesDropDownMenuModel
|
||||
buttonGroup: activeProfileButtonGroup
|
||||
modelKey: "quality_group"
|
||||
|
||||
function checkedFunction(modelItem)
|
||||
{
|
||||
if(Cura.MachineManager.hasCustomQuality)
|
||||
anchors
|
||||
{
|
||||
// When user created profile is active, no quality tickbox should be active.
|
||||
return false
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
return Cura.MachineManager.activeQualityType == modelItem.quality_type
|
||||
dataModel: model["qualities"]
|
||||
buttonGroup: activeProfileButtonGroup
|
||||
|
||||
function checkedFunction(modelItem)
|
||||
{
|
||||
if(Cura.MachineManager.hasCustomQuality)
|
||||
{
|
||||
// When user created profile is active, no quality tickbox should be active.
|
||||
return false
|
||||
}
|
||||
return Cura.MachineManager.activeQualityType == modelItem.quality_type && Cura.MachineManager.activeIntentCategory == modelItem.intent_category
|
||||
}
|
||||
|
||||
isCheckedFunction: checkedFunction
|
||||
}
|
||||
|
||||
isCheckedFunction: checkedFunction
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue