fix(@desktop/onboarding): update handler and naming
- add logic clarification comment Closes:#6518
This commit is contained in:
parent
06f6eb176f
commit
9af1d15f8e
|
@ -159,20 +159,22 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
property bool accountPopupOpened: false
|
property bool accountPopupWasOpened: false
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: -10
|
anchors.margins: -10
|
||||||
cursorShape: Qt.PointingHandCursor
|
cursorShape: Qt.PointingHandCursor
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
onEntered: {
|
onEntered: {
|
||||||
accountPopupOpened = accountsPopup.opened
|
// cache opened state, because it is always false in onClicked
|
||||||
|
// because of CloseOnPressOutsideParent policy of accountsPopup
|
||||||
|
accountPopupWasOpened = accountsPopup.opened
|
||||||
}
|
}
|
||||||
onPressed: {
|
onClicked: {
|
||||||
if (!accountPopupOpened) {
|
if (!accountPopupWasOpened) {
|
||||||
changeAccountBtn.clicked(mouse)
|
changeAccountBtn.clicked(mouse)
|
||||||
}
|
}
|
||||||
accountPopupOpened = accountsPopup.opened
|
accountPopupWasOpened = accountsPopup.opened
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue