Remember opened state of settings panel

So if you restart Cura while the settings panel was open, it'll stay open when Cura is started back up.

Contributes to issue CURA-6069.
This commit is contained in:
Ghostkeeper 2019-01-02 14:04:56 +01:00
parent ae7f843bbc
commit 96a6b7559e
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
3 changed files with 5 additions and 1 deletions

View file

@ -64,7 +64,7 @@ Item
property alias iconSize: collapseButton.height
// Is the "drawer" open?
readonly property alias expanded: contentContainer.visible
property alias expanded: contentContainer.visible
// What should the radius of the header be. This is also influenced by the headerCornerSide
property alias headerRadius: background.radius

View file

@ -29,4 +29,7 @@ Cura.ExpandableComponent
property var extrudersModel: CuraApplication.getExtrudersModel()
contentItem: PrintSetupSelectorContents {}
onExpandedChanged: UM.Preferences.setValue("view/settings_visible", expanded)
Component.onCompleted: expanded = UM.Preferences.getValue("view/settings_visible")
}