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 #303983 : MuseScore takes very long on opening some 2.x scores; w… #5969
Conversation
0289bfb
to
2857f13
Compare
I think I managed to solve point 1 and 2. |
There are many options to avoid code duplication but one option I can think of is to create a helper class for this instead of just a function, something like this (my comments are marked with
and using it like
Initializing an deinitializing these text reading-related variables can certainly also be done by standalone functions but perhaps such a helper class will make them more convenient to use. |
libmscore/read206.cpp
Outdated
@@ -1574,9 +1546,9 @@ static QString ReadStyleName206(XmlReader& e) | |||
// before setting anything else. | |||
//--------------------------------------------------------- | |||
|
|||
static bool readTextPropertyStyle206(XmlReader& e, TextBase* t, Element* be) | |||
static bool readTextPropertyStyle206(QString xmlTag, XmlReader& e, TextBase* t, Element* be) |
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.
A minor suggestion: to ensure that this XmlReader
is not actually used for reading it might be good to also declare the e
parameter as const XmlReader& e
(this will also require to mark XmlReader::lookupUserTextStyle()
function with const
modifier which should logically be there anyway).
…ithout breaking #285434
@dmitrio95 : thank you very much for your help. |
fix #303983 : MuseScore takes very long on opening some 2.x scores; w…
…ithout breaking #285434
See https://musescore.org/en/node/303983
This rewrites text property reading for 2.x scores, so that "style" tag can be read before the others.
Refactoring of the helper class was done with the precious help of dmitrio95.