-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[MU3] Fix #313195: enable the synalepha shortcut in lyrics edit mode #7105
Conversation
Oh, that's nice. Will do! |
Also make sure to have your commit title starting with "Fix #313195: " (as I've just reopened that issue as it is not fixed) |
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 code change does work for me, prior it did not.
Actually I've just added it to #7100 now (so for master) |
5299cf3
to
d299b67
Compare
Unfortunately, although now the shortcut does work in text edit mode, it doesn't in lyrics edit mode, where it would be most helpful. Anyway, it's a step forward towards the solution... |
Oh, darn, I guess in lyrics mode the Ctrl - is used differently and the added Alt doesn't change that |
It might help if you'd join the Developers' chat on Telegram https://t.me/musescoreeditorchat |
Ahhh... So I suppose I should find where the code for adding this symbol (-) is and add a conditional statement or something like that |
20a2160
to
d299b67
Compare
Maybe, in editlyrics.cpp, line 87...
but insertSym and ed should be defined/declarated/whatever |
rather line 67 |
What does that mean? Should I move |
5dc3484
to
b58d717
Compare
mscore/editlyrics.cpp
Outdated
editData.modifiers &= ~CONTROL_MODIFIER; | ||
return false; | ||
} | ||
if (Qt::ControlModifier & Qt::AltModifier) { |
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.
rather if (editDate.modifier & Qt::ControlModifier & Qt::AltModifier)
I think
Or if ( editData.control(textEditing) && (editDate.modifier & Qt::AltModifier))
050cb28
to
42547f8
Compare
In function |
mscore/editlyrics.cpp
Outdated
@@ -30,6 +31,8 @@ bool ScoreView::editKeyLyrics() | |||
{ | |||
Q_ASSERT(editData.element->isLyrics()); | |||
|
|||
void insertSym(EditData& ed, SymId id); |
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.
Adding the prototype here doesn't make a protected member visible to a foreign class
How about just this:
Seems to work just fine and doesn't need a protected method to get made public and avoids code duplication. win-win-win ;-) |
db18795
to
9bcd3a9
Compare
Yes! It works! Many thanks Jojo :)) |
Actually better add a |
Should the ending brace be before or after the |
In line 54 it is the only statement in the block, so the braces are not strictly needed (they are for master though, required by the new coding style) |
The mtest failures seem to not be your fault... |
6f7d65e
to
2da6cc4
Compare
Resolves: https://musescore.org/en/node/313195
Having PR #6928 been merged for 3.6 Beta, I tried using the introduced shortcut and it failed.
I think that this PR solves that problem, because the needed key wasn't
Qt::Key_hyphen
butQt::Key_Minus
.Although I yet don't know how to use cmake properly and get errors when trying to compile, I'll test the artifacts when they are generated.This will conflict with #7099, so maybe a rebase will be needed (would that be done withgit checkout <my-branch-name>
andgit rebase 3.x
?).editlyrics.cpp was also changed because, as it was, pressing ctrl ignored the commands from textedit.cpp