-
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
Fix #271505: Allow user to set mode along with key signature #3633
Conversation
Oh awesome. Thanks! |
38938f1
to
a04fa52
Compare
libmscore/keysig.cpp
Outdated
// undoSetModeType | ||
//--------------------------------------------------------- | ||
|
||
void KeySig::undoSetModeType(KeyMode v) |
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.
Why modetype? and not just mode ?
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.
Just because the enum is KEYSIG_MODETYPE
. I can change that, no problem
What part is no working specifically? How do you plan to change the mode of C major ? |
The dialog in Inspector doesn't work, it doesn't show the mode and doesn't allow to change it And indeed C-Major / a-minor is a problem. As is open/atonal. |
libmscore/keysig.cpp
Outdated
case Pid::KEYSIG_MODETYPE: | ||
if (generated()) | ||
return false; | ||
//setModeType(v); |
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 could be the reason why it's not set by the inspector maybe ?
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.
It is commented out because it doesn't compile ;-)
no known conversion from 'const QVariant' to 'Ms::KeyMode'
mscore/inspector/inspector.cpp
Outdated
@@ -678,7 +678,8 @@ InspectorKeySig::InspectorKeySig(QWidget* parent) | |||
const std::vector<InspectorItem> iiList = { | |||
{ Pid::LEADING_SPACE, 1, s.leadingSpace, s.resetLeadingSpace }, | |||
{ Pid::SHOW_COURTESY, 0, k.showCourtesy, k.resetShowCourtesy }, | |||
// { Pid::SHOW_NATURALS, 0, k.showNaturals, k.resetShowNaturals } | |||
//{ Pid::SHOW_NATURALS, 0, k.showNaturals, k.resetShowNaturals }, | |||
{ Pid::KEYSIG_MODETYPE,0, k.modeType, k.resetModeType } |
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 not enough to make the combo works. You need to define user data in the combo to match the value of the Keymode enum. If not, MuseScore uses enum value as index void InspectorBase::setValue(const InspectorItem& ii, QVariant val)
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.
OK, this might be it then.
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.
Now at least that menu doesn't start empty, but with "Unknown", still the setting doesn't stick though
b8fd31b
to
e631485
Compare
libmscore/keysig.cpp
Outdated
case Pid::KEYSIG_MODE: | ||
if (generated()) | ||
return false; | ||
//setMode(v); // no known conversion from 'const QVariant' to 'Ms::KeyMode' |
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.
KeyMode(v.toInt()) ?
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.
oops, indeed
cec970d
to
2fbeb47
Compare
Probably |
e5aa6dd
to
08d3fae
Compare
08d3fae
to
1a1ad44
Compare
df6e62e
to
04e1c59
Compare
04e1c59
to
f3cf2f2
Compare
13b98c2
to
553677d
Compare
return "major"; | ||
case KeyMode::MINOR: | ||
return "minor"; | ||
default: |
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 switch
should probably include all the new KeyMode
entries too (if this PR is still actual).
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.
oops
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.
fixed
Strange, why do I get merge conflicts on rebase, but none are reported here? |
08c59e9
to
9e744f1
Compare
Ooops, something went wrong with inspector_keysig.ui... |
9e744f1
to
6b70bd0
Compare
for MusicXML im- and export of all possible key signatur modes
6b70bd0
to
1b7d265
Compare
@anatoly-os I believe the "work in progress" label can get removed |
follow up to musescore#3633, there this had been forgotten (by me)
follow up to musescore#3633, there this had been forgotten (by me) Backport of musescore#13060
follow up to musescore#3633, there this had been forgotten (by me) Backport of musescore#13060
MusicXML im- and export of all possible key signatur modes.
Make these availble to the UI, via the Key Signature Inspector. (WIP, it doesn't quite work yet, any idea why?)