Merge pull request #11630 from VanSHOE/task11455
fix:#11455: Double clicking instrument automatically submits
This commit is contained in:
commit
751c0866ab
|
@ -39,6 +39,8 @@ Rectangle {
|
|||
|
||||
property NavigationSection navigationSection: null
|
||||
|
||||
signal submitRequested()
|
||||
|
||||
function instruments() {
|
||||
if (root.canSelectMultipleInstruments) {
|
||||
return instrumentsOnScoreView.instruments()
|
||||
|
@ -142,6 +144,10 @@ Rectangle {
|
|||
|
||||
onAddSelectedInstrumentsToScoreRequested: {
|
||||
prv.addSelectedInstrumentsToScore()
|
||||
|
||||
if (!root.canSelectMultipleInstruments) {
|
||||
root.submitRequested()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,15 @@ StyledDialogView {
|
|||
instrumentsPage.focusOnFirst()
|
||||
}
|
||||
|
||||
function submit() {
|
||||
var result = {}
|
||||
result["instruments"] = instrumentsPage.instruments()
|
||||
result["scoreOrder"] = instrumentsPage.currentOrder()
|
||||
|
||||
root.ret = { errcode: 0, value: result }
|
||||
root.hide()
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
spacing: 20
|
||||
|
@ -57,6 +66,10 @@ StyledDialogView {
|
|||
currentInstrumentId: root.currentInstrumentId
|
||||
|
||||
navigationSection: root.navigationSection
|
||||
|
||||
onSubmitRequested: {
|
||||
root.submit()
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -106,12 +119,7 @@ StyledDialogView {
|
|||
navigation.column: 2
|
||||
|
||||
onClicked: {
|
||||
var result = {}
|
||||
result["instruments"] = instrumentsPage.instruments()
|
||||
result["scoreOrder"] = instrumentsPage.currentOrder()
|
||||
|
||||
root.ret = { errcode: 0, value: result }
|
||||
root.hide()
|
||||
root.submit()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue