Browse Source

Merge pull request #3823 from DonLakeFlyer/DoubleConfirm

Prevent multiple clicks on dialog buttons
QGC4.4
Don Gagne 9 years ago committed by GitHub
parent
commit
478b0edd9d
  1. 12
      src/QmlControls/QGCView.qml

12
src/QmlControls/QGCView.qml

@ -123,6 +123,9 @@ FactPanel { @@ -123,6 +123,9 @@ FactPanel {
return
}
__rejectButton.enabled = true
__acceptButton.enabled = true
__stopAllAnimations()
__dialogCharWidth = charWidth
@ -144,6 +147,9 @@ FactPanel { @@ -144,6 +147,9 @@ FactPanel {
return
}
__rejectButton.enabled = true
__acceptButton.enabled = true
__stopAllAnimations()
__dialogCharWidth = showDialogDefaultWidth
@ -302,7 +308,10 @@ FactPanel { @@ -302,7 +308,10 @@ FactPanel {
anchors.right: __acceptButton.visible ? __acceptButton.left : parent.right
anchors.bottom: parent.bottom
onClicked: __dialogComponentLoader.item.reject()
onClicked: {
enabled = false // prevent multiple clicks
__dialogComponentLoader.item.reject()
}
}
QGCButton {
@ -311,6 +320,7 @@ FactPanel { @@ -311,6 +320,7 @@ FactPanel {
primary: true
onClicked: {
enabled = false // prevent multiple clicks
__dialogComponentLoader.item.accept()
}
}

Loading…
Cancel
Save