mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
CURA-4870 Use the visible property instead of a Qt5.10 existing 'opened'
property. This is needed to avoid a crashing for those that are using 5.10 running from source.
This commit is contained in:
parent
2fdd51fc23
commit
e6c5bd28b2
1 changed files with 5 additions and 6 deletions
|
@ -16,7 +16,7 @@ Item
|
|||
|
||||
function switchPopupState()
|
||||
{
|
||||
popup.opened ? popup.close() : popup.open()
|
||||
popup.visible ? popup.close() : popup.open()
|
||||
}
|
||||
|
||||
SyncButton
|
||||
|
@ -28,15 +28,14 @@ Item
|
|||
|
||||
Popup
|
||||
{
|
||||
// TODO Change once updating to Qt5.10 - This property is already in 5.10 but is manually implemented until upgrade
|
||||
property bool opened: false
|
||||
// TODO Change once updating to Qt5.10 - The 'opened' property is in 5.10 but the behavior is now implemented with the visible property
|
||||
id: popup
|
||||
clip: true
|
||||
closePolicy: Popup.CloseOnPressOutsideParent
|
||||
y: configurationSelector.height - UM.Theme.getSize("default_lining").height
|
||||
x: configurationSelector.width - width
|
||||
width: panelWidth
|
||||
visible: opened
|
||||
visible: false
|
||||
padding: UM.Theme.getSize("default_lining").width
|
||||
transformOrigin: Popup.Top
|
||||
contentItem: ConfigurationListView
|
||||
|
@ -60,7 +59,7 @@ Item
|
|||
// This applies a default NumberAnimation to any changes a state change makes to x or y properties
|
||||
NumberAnimation { property: "visible"; duration: 75; }
|
||||
}
|
||||
onClosed: opened = false
|
||||
onOpened: opened = true
|
||||
onClosed: visible = false
|
||||
onOpened: visible = true
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue