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:
Jaime van Kessel 2018-10-01 11:32:55 +02:00
parent 3e7021d729
commit fc9f05fc8b
5 changed files with 154 additions and 90 deletions

View file

@ -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);
}
}