From f3ea5a57bce11e40b20201c5f43d63f890055fed Mon Sep 17 00:00:00 2001 From: diedeno <102964661+diedeno@users.noreply.github.com> Date: Sat, 28 Jan 2023 14:16:42 +0100 Subject: [PATCH 1/2] Add files via upload --- blacknotes.qml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/blacknotes.qml b/blacknotes.qml index 92b7ac8..9634880 100644 --- a/blacknotes.qml +++ b/blacknotes.qml @@ -26,7 +26,20 @@ import MuseScore 3.0 MuseScore { version: "3.0" description: "This plugin paints all chords and rests in black" - menuPath: "Plugins.Notes.Color Notes in Black" + // menuPath: "Plugins.Notes.Color Notes in Black" + // title: "Black Notes" + + Component.onCompleted : { + if (mscoreMajorVersion >= 4) { + title = qsTr("Black Notes") ; + // thumbnailName = ".png"; + categoryCode = "color-notes"; + } + } + + + + MessageDialog { id: versionError @@ -34,7 +47,7 @@ MuseScore { title: qsTr("Unsupported MuseScore Version") text: qsTr("This plugin needs MuseScore 3.0.2 or later") onAccepted: { - Qt.quit() + quit() } } @@ -129,12 +142,18 @@ MuseScore { } onRun: { + + curScore.startCmd() + console.log("Hello, Black Notes") // check MuseScore version - if (mscoreMajorVersion == 3 && mscoreMinorVersion == 0 && mscoreUpdateVersion <= 1) + if ((mscoreMajorVersion < 3) || ((mscoreMajorVersion == 3 && mscoreMinorVersion == 0 && mscoreUpdateVersion <= 1))) versionError.open() else - applyToChordsAndRestsInSelection(blackenElement) - Qt.quit(); + applyToChordsAndRestsInSelection(blackenElement) + + curScore.endCmd() + + quit(); } } From cd19aee6261db5534582508091ba0488fd279ae8 Mon Sep 17 00:00:00 2001 From: diedeno <102964661+diedeno@users.noreply.github.com> Date: Sat, 28 Jan 2023 14:18:45 +0100 Subject: [PATCH 2/2] Update blacknotes.qml --- blacknotes.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blacknotes.qml b/blacknotes.qml index 9634880..8fe4471 100644 --- a/blacknotes.qml +++ b/blacknotes.qml @@ -26,8 +26,8 @@ import MuseScore 3.0 MuseScore { version: "3.0" description: "This plugin paints all chords and rests in black" - // menuPath: "Plugins.Notes.Color Notes in Black" - // title: "Black Notes" + menuPath: "Plugins.Notes.Color Notes in Black" + Component.onCompleted : { if (mscoreMajorVersion >= 4) {