mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 16:28:59 +08:00
Merge branch '4.0' of github.com:Ultimaker/Cura
This commit is contained in:
commit
8f04316ef8
@ -278,13 +278,13 @@ UM.MainWindow
|
|||||||
height: UM.Theme.getSize("stage_menu").height
|
height: UM.Theme.getSize("stage_menu").height
|
||||||
source: UM.Controller.activeStage != null ? UM.Controller.activeStage.stageMenuComponent : ""
|
source: UM.Controller.activeStage != null ? UM.Controller.activeStage.stageMenuComponent : ""
|
||||||
|
|
||||||
|
|
||||||
// HACK: This is to ensure that the parent never gets set to null, as this wreaks havoc on the focus.
|
// HACK: This is to ensure that the parent never gets set to null, as this wreaks havoc on the focus.
|
||||||
function onParentDestroyed()
|
function onParentDestroyed()
|
||||||
{
|
{
|
||||||
printSetupSelector.parent = stageMenu
|
printSetupSelector.parent = stageMenu
|
||||||
printSetupSelector.visible = false
|
printSetupSelector.visible = false
|
||||||
}
|
}
|
||||||
|
property Item oldParent: null
|
||||||
|
|
||||||
// The printSetupSelector is defined here so that the setting list doesn't need to get re-instantiated
|
// The printSetupSelector is defined here so that the setting list doesn't need to get re-instantiated
|
||||||
// Every time the stage is changed.
|
// Every time the stage is changed.
|
||||||
@ -295,12 +295,16 @@ UM.MainWindow
|
|||||||
headerCornerSide: RoundedRectangle.Direction.Right
|
headerCornerSide: RoundedRectangle.Direction.Right
|
||||||
onParentChanged:
|
onParentChanged:
|
||||||
{
|
{
|
||||||
|
if(stageMenu.oldParent !=null)
|
||||||
|
{
|
||||||
|
stageMenu.oldParent.Component.destruction.disconnect(stageMenu.onParentDestroyed)
|
||||||
|
}
|
||||||
|
stageMenu.oldParent = parent
|
||||||
visible = parent != stageMenu
|
visible = parent != stageMenu
|
||||||
parent.Component.destruction.connect(stageMenu.onParentDestroyed)
|
parent.Component.destruction.connect(stageMenu.onParentDestroyed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
UM.MessageStack
|
UM.MessageStack
|
||||||
{
|
{
|
||||||
anchors
|
anchors
|
||||||
|
@ -54,7 +54,7 @@ Item
|
|||||||
{
|
{
|
||||||
text: model.name.toUpperCase()
|
text: model.name.toUpperCase()
|
||||||
checkable: true
|
checkable: true
|
||||||
checked: model.id == UM.Controller.activeStage.stageId
|
checked: UM.Controller.activeStage != null ? model.id == UM.Controller.activeStage.stageId : false
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
exclusiveGroup: mainWindowHeaderMenuGroup
|
exclusiveGroup: mainWindowHeaderMenuGroup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user