Changeset View
Changeset View
Standalone View
Standalone View
src/activities/piano_composition/OptionsRow.qml
Context not available. | |||||
59 | signal clearButtonClicked | 59 | signal clearButtonClicked | ||
---|---|---|---|---|---|
60 | signal openButtonClicked | 60 | signal openButtonClicked | ||
61 | signal saveButtonClicked | 61 | signal saveButtonClicked | ||
62 | signal restReplaced | ||||
62 | signal emitOptionMessage(string message) | 63 | signal emitOptionMessage(string message) | ||
63 | 64 | | |||
64 | SwitchableOptions { | 65 | SwitchableOptions { | ||
Context not available. | |||||
113 | onClicked: { | 114 | onClicked: { | ||
114 | background.staffMode = optionsRow.staffModes[currentIndex][1] | 115 | background.staffMode = optionsRow.staffModes[currentIndex][1] | ||
115 | emitOptionMessage(optionsRow.staffModes[currentIndex][0]) | 116 | emitOptionMessage(optionsRow.staffModes[currentIndex][0]) | ||
116 | if(background.staffMode != "replace") { | 117 | multipleStaff.selectedIndex = -1 | ||
117 | multipleStaff.noteToReplace = -1 | 118 | multipleStaff.insertingIndex = multipleStaff.notesModel.count | ||
118 | } | | |||
119 | } | 119 | } | ||
120 | } | 120 | } | ||
121 | 121 | | |||
Context not available. | |||||
239 | //: %1 is the name of the rest which is added and displayed from the variable translatedRestNames. | 239 | //: %1 is the name of the rest which is added and displayed from the variable translatedRestNames. | ||
240 | emitOptionMessage(qsTr("Added %1").arg(optionsRow.translatedRestNames[restOptionIndex])) | 240 | emitOptionMessage(qsTr("Added %1").arg(optionsRow.translatedRestNames[restOptionIndex])) | ||
241 | parent.scale = 1 | 241 | parent.scale = 1 | ||
242 | if(background.staffMode === "add") | 242 | if(background.staffMode === "add") { | ||
243 | multipleStaff.addNote(restType.toLowerCase(), "Rest", false, false) | 243 | if(multipleStaff.selectedIndex == 0) | ||
244 | else | 244 | background.askInsertDirection(restType.toLowerCase(), "Rest") | ||
245 | multipleStaff.replaceNote(restType.toLowerCase(), "Rest") | 245 | else | ||
246 | background.addNoteAndPushToStack(restType.toLowerCase(), "Rest") | ||||
247 | } | ||||
248 | else { | ||||
249 | if(multipleStaff.selectedIndex != -1) { | ||||
250 | restReplaced() | ||||
251 | multipleStaff.replaceNote(restType.toLowerCase(), "Rest") | ||||
252 | } | ||||
253 | } | ||||
246 | } | 254 | } | ||
247 | } | 255 | } | ||
248 | } | 256 | } | ||
Context not available. |