mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-12-05 16:51:12 -07:00
Moved SettingVisibilityPreset loading to it's own class
Since there was so much debate regarding the unit testing of the visiblity presets, i had another look at it. The old version was almost untestable because all functionalities were mushed together into a single class. CURA-5734
This commit is contained in:
parent
3e7021d729
commit
fc9f05fc8b
5 changed files with 154 additions and 90 deletions
|
|
@ -18,17 +18,17 @@ Menu
|
|||
|
||||
Instantiator
|
||||
{
|
||||
model: settingVisibilityPresetsModel
|
||||
model: settingVisibilityPresetsModel.items
|
||||
|
||||
MenuItem
|
||||
{
|
||||
text: model.name
|
||||
text: modelData.name
|
||||
checkable: true
|
||||
checked: model.id == settingVisibilityPresetsModel.activePreset
|
||||
checked: modelData.id == settingVisibilityPresetsModel.activePreset
|
||||
exclusiveGroup: group
|
||||
onTriggered:
|
||||
{
|
||||
settingVisibilityPresetsModel.setActivePreset(model.id);
|
||||
settingVisibilityPresetsModel.setActivePreset(modelData.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue