fix demo plugins to use newCursor instead of QML elements
This commit is contained in:
parent
7423c85951
commit
d167ec515c
2 changed files with 2 additions and 10 deletions
|
@ -30,12 +30,8 @@ MuseScore {
|
|||
// Apply the given function to all notes in selection
|
||||
// or, if nothing is selected, in the entire score
|
||||
|
||||
Cursor {
|
||||
id: cursor
|
||||
score: curScore
|
||||
}
|
||||
|
||||
function applyToNotesInSelection(func) {
|
||||
var cursor = curScore.newCursor();
|
||||
cursor.rewind(1);
|
||||
var startStaff = cursor.staffIdx;
|
||||
cursor.rewind(2);
|
||||
|
|
|
@ -21,14 +21,10 @@ MuseScore {
|
|||
description: qsTr("This plugin names notes")
|
||||
menuPath: "Plugins.Notes." + qsTr("Note Names") // this does not work, why?
|
||||
|
||||
Cursor {
|
||||
id: cursor
|
||||
score: curScore
|
||||
}
|
||||
onRun: {
|
||||
if (typeof curScore === 'undefined')
|
||||
Qt.quit();
|
||||
|
||||
var cursor = curScore.newCursor();
|
||||
cursor.rewind(1);
|
||||
var startStaff = cursor.staffIdx;
|
||||
cursor.rewind(2);
|
||||
|
|
Loading…
Reference in a new issue