-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: 303027 - Add System lines #5965
Fix: 303027 - Add System lines #5965
Conversation
da40c39
to
b1d03c1
Compare
Rebase needed. |
b1d03c1
to
1b146bd
Compare
1b146bd
to
e0f3bc6
Compare
Rebase done. |
Another rebase needed... |
e0f3bc6
to
85911cd
Compare
Rebase done (getting experienced 😉) |
looks like the mtest fail is not your fault, but a network issue |
85911cd
to
211dc59
Compare
Push again solved the problem. We be nice if all issues were that easy 😃 |
sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Text line")); | ||
sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Staff Text line")); | ||
|
||
TextLine* systemTextLine = new TextLine(gscore, true); |
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.
I'm wondering where "systemTextLine" will be deleted from heap
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.
Nowhere, this is and stays in the palette. Similar as the other elements here.
@@ -1466,9 +1466,15 @@ PalettePanel* MuseScore::newLinesPalettePanel() | |||
|
|||
TextLine* textLine = new TextLine(gscore); | |||
textLine->setLen(w); | |||
textLine->setBeginText("VII"); |
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 curious
Why was it here? :)
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.
For a Capo/Barre ? I think it should stay.
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.
Using a Roman Chord identifier in a trill line doesn't make much sense, does it?
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 not a trill lin, it is after the trill lines...
It is (supposed to be an example for) a Capo line, the Roman number supposed to denote the fret you should place the capo at (here: fret 7), as far as I can tell
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.
Sorry, I misread the location.
In the old textline (which was on the staff only), there was this text VII
. But now we have the same element which can be both be system and non-system but they have their own entry on the palette. So the text VII
is changed to Staff
to indicate a staff textline. The new system textline will have the text System
. The old VII
had no real meaning.
//--------------------------------------------------------- | ||
|
||
static const ElementStyle systemTextLineStyle { | ||
// { Sid::systemTextLineSystemFlag, Pid::SYSTEM_FLAG }, |
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.
Does this really need to be commented out? I thought you used it in several places
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.
The flag is set at another place since the textline can now be both system and non-system.
textLine->setEndHookType(HookType::HOOK_90); | ||
sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Text line")); | ||
sp->append(textLine, QT_TRANSLATE_NOOP("Palette", "Staff Text line")); |
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.
Not sure how to name it then though. It certainly is (an example for) a staff based text line.
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.
As requested, this PR includes the same textline twice on the palette, once as a "Staff Text Line" (which was the original Text Line) and a new "System Text Line" which is a few lines lower. Leaving the original name unchanged could cause confusion.
211dc59
to
66231b6
Compare
@njvdberg there are some issues with mtests here |
The mtest score mtest/libmscore/parts/part-textlines.mscx needs to get adjusted. |
66231b6
to
8750dfe
Compare
This PR adds System Text Lines. System Text Lines are like Text Lines but are attached to a system instead of staff. System Text Lines are implemented as an extention of the existing TextLine. In the Inspector The TextLine will show an new button, System Text Line. With this button a TextLine can changed into a SystemTextLine and vice versa. To be consistent with the StaffText and SystemText, in the palette both original TextLine and the new SystemTextLine will appear as two items. To support different styles for both text lines, TextLine now supports two different styles. Depending on the value of systemFlag() the correct style is chosen. In the MSCX/MSCZ file the new SystemTextFile is saved a TextLine with attribute "system=1". If system attribute has the value 0, or is missing, indicates a TextLine. In MusicXML, SystemTextLine's are exported as normal TextLine's. Also, when a score containing SystemTextLine's is loaded into an older 3.* version, these SystemTextLine's are seen as normal TextLine's.
8750dfe
to
8ecbeec
Compare
These vtest violations are not expected. And even wrong 😉. |
Ah, good to have them then ;-) |
MuseScoreCore::mscoreCore->updateInspector(); | ||
return; | ||
} | ||
initStyle(); |
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.
What is the purpose of this? It causes any change to one property to reset all other properties to style defaults.
Export the volta text to the MusicXML ending element, allowing custom text such as "1-3". Backport of #10623, plus 2 more mtest fixes
Resolves: https://musescore.org/en/node/303027
This PR add
System Text Lines
.System Text Lines
are likeText Lines
but are attached to a system instead of staff.System Text Lines
are implemented as an extension of the existingTextLine
. In the Inspector theTextLine
will show an new button, System Text Line. With thisbutton a
TextLine
can changed into aSystemTextLine
and vice versa.To be consistent with the
StaffText
andSystemText
, in the palette both originalTextLine
and the newSystemTextLine
will appear as two items.To support different styles for both text lines,
TextLine
now supports two different styles. Depending on the value ofsystemFlag()
the correct style is chosen.In the MSCX/MSCZ file the new
SystemTextFile
is saved aTextLine
with attributesystem=1
. Asystem
attribute has the value 0, or is missing, indicates aTextLine
.In MusicXML,
SystemTextLine
's are exported as normalTextLine
's. Also, when a score containingSystemTextLine
's is loaded into an older 3.* version, theseSystemTextLine
's are seen as normalTextLine
's.This PR replaces #5925