mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 16:45:56 +08:00
Configure whether preview shortcut is visible from ActionPanelWidget property
This way it's more dynamic: You don't need to hardcode the plug-in name in the widget to see whether or not it's visible. Contributes to issue CURA-6086.
This commit is contained in:
parent
5992e66ed6
commit
a831cfa558
@ -25,5 +25,6 @@ Item
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
anchors.rightMargin: UM.Theme.getSize("thick_margin").width
|
||||||
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height
|
anchors.bottomMargin: UM.Theme.getSize("thick_margin").height
|
||||||
|
hasPreviewButton: false
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -19,6 +19,8 @@ Item
|
|||||||
height: childrenRect.height
|
height: childrenRect.height
|
||||||
visible: CuraApplication.platformActivity
|
visible: CuraApplication.platformActivity
|
||||||
|
|
||||||
|
property bool hasPreviewButton: true
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: actionPanelWidget
|
id: actionPanelWidget
|
||||||
@ -47,6 +49,13 @@ Item
|
|||||||
rightMargin: UM.Theme.getSize("thick_margin").width
|
rightMargin: UM.Theme.getSize("thick_margin").width
|
||||||
}
|
}
|
||||||
sourceComponent: actionPanelWidget.outputAvailable ? outputProcessWidget : sliceProcessWidget
|
sourceComponent: actionPanelWidget.outputAvailable ? outputProcessWidget : sliceProcessWidget
|
||||||
|
onLoaded:
|
||||||
|
{
|
||||||
|
if(actionPanelWidget.outputAvailable)
|
||||||
|
{
|
||||||
|
loader.item.hasPreviewButton = base.hasPreviewButton;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Component
|
Component
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2019 Ultimaker B.V.
|
||||||
// Cura is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
@ -19,6 +19,7 @@ Column
|
|||||||
|
|
||||||
spacing: UM.Theme.getSize("thin_margin").height
|
spacing: UM.Theme.getSize("thin_margin").height
|
||||||
property bool preSlicedData: PrintInformation.preSliced
|
property bool preSlicedData: PrintInformation.preSliced
|
||||||
|
property alias hasPreviewButton: previewStageShortcut.visible
|
||||||
|
|
||||||
UM.I18nCatalog
|
UM.I18nCatalog
|
||||||
{
|
{
|
||||||
@ -120,7 +121,6 @@ Column
|
|||||||
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft
|
toolTipContentAlignment: Cura.ToolTip.ContentAlignment.AlignLeft
|
||||||
|
|
||||||
onClicked: UM.Controller.setActiveStage("PreviewStage")
|
onClicked: UM.Controller.setActiveStage("PreviewStage")
|
||||||
visible: UM.Controller.activeStage != null && UM.Controller.activeStage.stageId != "PreviewStage"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Cura.OutputDevicesActionButton
|
Cura.OutputDevicesActionButton
|
||||||
|
Loading…
x
Reference in New Issue
Block a user