Commit 478b0edd authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #3823 from DonLakeFlyer/DoubleConfirm

Prevent multiple clicks on dialog buttons
parents 46c6b8df 37353e60
...@@ -123,6 +123,9 @@ FactPanel { ...@@ -123,6 +123,9 @@ FactPanel {
return return
} }
__rejectButton.enabled = true
__acceptButton.enabled = true
__stopAllAnimations() __stopAllAnimations()
__dialogCharWidth = charWidth __dialogCharWidth = charWidth
...@@ -144,6 +147,9 @@ FactPanel { ...@@ -144,6 +147,9 @@ FactPanel {
return return
} }
__rejectButton.enabled = true
__acceptButton.enabled = true
__stopAllAnimations() __stopAllAnimations()
__dialogCharWidth = showDialogDefaultWidth __dialogCharWidth = showDialogDefaultWidth
...@@ -302,7 +308,10 @@ FactPanel { ...@@ -302,7 +308,10 @@ FactPanel {
anchors.right: __acceptButton.visible ? __acceptButton.left : parent.right anchors.right: __acceptButton.visible ? __acceptButton.left : parent.right
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
onClicked: __dialogComponentLoader.item.reject() onClicked: {
enabled = false // prevent multiple clicks
__dialogComponentLoader.item.reject()
}
} }
QGCButton { QGCButton {
...@@ -311,6 +320,7 @@ FactPanel { ...@@ -311,6 +320,7 @@ FactPanel {
primary: true primary: true
onClicked: { onClicked: {
enabled = false // prevent multiple clicks
__dialogComponentLoader.item.accept() __dialogComponentLoader.item.accept()
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment