-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update colornotes.qml to use Score.elements.selection #8141
Conversation
I didn't check "I made sure the code compiles on my machine" because so far I can't get MuseScore to compile. But the plugin code compiles/runs as expected. |
note.dots[i].color = colors[note.pitch % 12]; | ||
else | ||
note.dots[i].color = black; | ||
if (note.dots) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At one point my plugin crashed here because I accidentally passed in something that wasn't a note, so figured it was worth keeping as a safety check
It'd be advisable not to use your master branch for PRs but some 'topic-branch' |
share/plugins/colornotes.qml
Outdated
note.dots[i].color = colors[note.pitch % 12]; | ||
else | ||
note.dots[i].color = black; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One level less indent here
And for the next 2 closing braces too
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is where the excess indent from above looks bad and confusing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I noticed that myself, was going to fix
Yeah I wouldn't normally, but had already made the change and forgot to checkout the new branch before committing. |
Wouldn't a similar change apply to the notenames plugin too? You may want to bump up the version number of that plugin too. |
No merge commits, please, just |
Is that for future reference? And are those "rules" explained anywhere (I've never seen the point in those sort of policies, been using git for 10 years, but admittedly not done a heap of open-source collaboration) |
It is, in the developers' handbook, git workflow |
Hmm ok, thanks - who's able to approve running the remaining workflows btw? |
Only staff members AFAIK. @vpereverzev? |
The option to squash while merging doesn't seem to be available in github, might be a permissions thing? |
It is available localy, e.g. |
I thought I did that (well, not quite, I can't use |
@wizofaus Did you find any issues with your PR ? |
Windows only but given the nature of the change would be very surprised if it behaved differently elsewhere. |
Indeed, those changes should be entirely platform independant. I just found issueswith this: if nothing gets selected, it does color every note, which is OK and same as before the changes, but that operation is not undoable anymore (except by running the plugin again), nor is the score marked 'dirty', regardless of having been changed. These are regressions that need fixing. |
Good catch, will look into that today. |
curScore.startCmd()/endCmd() work for me, note I put startCmd after select-all. Can you re-test? I notice it still hasn't run all the workflows, I assume all 8 are needed for it to be merged? |
Hmm, I had Before getting the workflow to run, please squash all your changes into just one commit. |
I don't know how to squash the commits only on the remote branch. I don't want to squash locally, particularly on my master branch, as it's very useful having a full commit history. |
Well, I guess you'd just have to, if you want this merged. It is one fix, so should be just one commit. |
a6a11a4
to
138428d
Compare
Looks like I figured out a way, though it was hardly straightforward! |
The behaviour of reselecting all elements after an undo that applies to all elements is exactly what occurs normally though (when not using a plugin). Understood its different to the previous colornotes behaviour but I don't see it's a problem... |
Well, it is a problem though. Whether it is a major one and/or one that can and should get fixed or whether it can be let passed is a different question. |
yes |
Can we close it without merge ? |
Why? |
@wizofaus please rerun build check for MacOS, I would like to test also on this platform |
I don't think us 'mere mortals' can do this? Other than via something like |
@Jojo-Schmitz triggered |
Checked. Seems fine |
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Fixes the bug in ColorNotes that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code. Backport of musescore#8141
Resolves: https://musescore.org/en/node/321398
Fixes the bug in the ColorNotes sample plugin that causes it to apply to notes not currently selected if a distinct selection (not a range) is used, and simplifies the code.