mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -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()
|
function switchPopupState()
|
||||||
{
|
{
|
||||||
popup.opened ? popup.close() : popup.open()
|
popup.visible ? popup.close() : popup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
SyncButton
|
SyncButton
|
||||||
|
@ -28,15 +28,14 @@ Item
|
||||||
|
|
||||||
Popup
|
Popup
|
||||||
{
|
{
|
||||||
// TODO Change once updating to Qt5.10 - This property is already in 5.10 but is manually implemented until upgrade
|
// TODO Change once updating to Qt5.10 - The 'opened' property is in 5.10 but the behavior is now implemented with the visible property
|
||||||
property bool opened: false
|
|
||||||
id: popup
|
id: popup
|
||||||
clip: true
|
clip: true
|
||||||
closePolicy: Popup.CloseOnPressOutsideParent
|
closePolicy: Popup.CloseOnPressOutsideParent
|
||||||
y: configurationSelector.height - UM.Theme.getSize("default_lining").height
|
y: configurationSelector.height - UM.Theme.getSize("default_lining").height
|
||||||
x: configurationSelector.width - width
|
x: configurationSelector.width - width
|
||||||
width: panelWidth
|
width: panelWidth
|
||||||
visible: opened
|
visible: false
|
||||||
padding: UM.Theme.getSize("default_lining").width
|
padding: UM.Theme.getSize("default_lining").width
|
||||||
transformOrigin: Popup.Top
|
transformOrigin: Popup.Top
|
||||||
contentItem: ConfigurationListView
|
contentItem: ConfigurationListView
|
||||||
|
@ -60,7 +59,7 @@ Item
|
||||||
// This applies a default NumberAnimation to any changes a state change makes to x or y properties
|
// This applies a default NumberAnimation to any changes a state change makes to x or y properties
|
||||||
NumberAnimation { property: "visible"; duration: 75; }
|
NumberAnimation { property: "visible"; duration: 75; }
|
||||||
}
|
}
|
||||||
onClosed: opened = false
|
onClosed: visible = false
|
||||||
onOpened: opened = true
|
onOpened: visible = true
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue