Fix showing default sidebar, cleanup needed

This commit is contained in:
ChrisTerBeke 2017-12-04 19:48:42 +01:00
parent caf56587fe
commit 5673a834bc

View File

@ -379,6 +379,25 @@ UM.MainWindow
width: UM.Theme.getSize("sidebar").width
// This is the default sidebar view.
// It is hidden when the active sidebar view ID is not default.
Sidebar
{
id: defaultSidebar
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
right: parent.right
}
width: parent.width
z: 1
monitoringPrint: base.showPrintMonitor
visible: Cura.SidebarController.activeSidebarId == "default"
}
// The sidebarRepeater exposes sidebar views provided by plugins.
// Whenever a plugin sidebar view is active (e.g. not "default"), that sidebar view is shown.
Repeater
@ -397,8 +416,6 @@ UM.MainWindow
sourceComponent: {
if (model.id !== "default") {
return Cura.SidebarController.getSidebarComponent(model.id)
} else {
return defaultSidebar
}
}
}
@ -453,27 +470,6 @@ UM.MainWindow
}
}
// This is the default sidebar view.
// It is used as sourceComponent for the default sidebar view.
Component
{
id: defaultSidebar
Sidebar
{
// anchors {
// top: parent.top
// bottom: parent.bottom
// left: parent.left
// right: parent.right
// }
//
// width: parent.width
//
// monitoringPrint: base.showPrintMonitor
}
}
UM.PreferencesDialog
{
id: preferences