mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-26 12:21:26 -07: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
3 changed files with 12 additions and 2 deletions
|
|
@ -19,6 +19,8 @@ Item
|
|||
height: childrenRect.height
|
||||
visible: CuraApplication.platformActivity
|
||||
|
||||
property bool hasPreviewButton: true
|
||||
|
||||
Rectangle
|
||||
{
|
||||
id: actionPanelWidget
|
||||
|
|
@ -47,6 +49,13 @@ Item
|
|||
rightMargin: UM.Theme.getSize("thick_margin").width
|
||||
}
|
||||
sourceComponent: actionPanelWidget.outputAvailable ? outputProcessWidget : sliceProcessWidget
|
||||
onLoaded:
|
||||
{
|
||||
if(actionPanelWidget.outputAvailable)
|
||||
{
|
||||
loader.item.hasPreviewButton = base.hasPreviewButton;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue