Skip to content
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

Migration of palette elements #17633

Merged
merged 1 commit into from May 27, 2023

Conversation

mike-spa
Copy link
Contributor

Resolves: #17581

@cbjeukendrup @igorkorsukov I've attempted a very basic solution here which seems to work nicely. Let me know if it's ok or we need something different.

@@ -224,6 +230,41 @@ bool PaletteCell::read(XmlReader& e)
return add && element;
}

void PaletteCell::migrateOldItemIfNeeded()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to add a separate class with name like "PaletteCompat" and add this function to it as static with input arg and output (new item);
In the future, we may add other functions to this class and we will see what kind of compatibility we support.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorkorsukov done! 👍

@mike-spa mike-spa force-pushed the migrationOfPaletteElements branch 3 times, most recently from 3927fbf to e1e2236 Compare May 22, 2023 12:39
@mike-spa mike-spa force-pushed the migrationOfPaletteElements branch 3 times, most recently from 9f696ba to 9defca8 Compare May 24, 2023 10:19
@mike-spa
Copy link
Contributor Author

@igorkorsukov the builds and tests are now all passing, feel free to merge this, if it's ok

Copy link
Contributor

@cbjeukendrup cbjeukendrup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, looks good to me too!

src/engraving/rw/compat/compatutils.h Outdated Show resolved Hide resolved
@igorkorsukov
Copy link
Contributor

@igorkorsukov the builds and tests are now all passing, feel free to merge this, if it's ok

I think it needs to be tested. @DmitryArefiev FYI

@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented May 25, 2023

@mike-spa So the way to check is run 4.0.2 build reset text palette (should be 'Expression'), then run PR's build - it should show 'expression' without Text palette reset, correct?

@DmitryArefiev
Copy link
Contributor

DmitryArefiev commented May 26, 2023

I found how to check it. Run 4.0.2 build (dev), reset ornament palette, run PR's build, add an ornament to score, check available options in Properties: they should have an updated style (without Reset ornament palette).

Tested on Mac13 - PASS

@mike-spa I see the branch has a conflicts, should be resolved before merge?

@mike-spa
Copy link
Contributor Author

@mike-spa So the way to check is run 4.0.2 build reset text palette (should be 'Expression'), then run PR's build - it should show 'expression' without Text palette reset, correct?

@DmitryArefiev yes, sorry I missed this comment. That's exactly the way to test it, and also the other one you did with expressions. Thank you for testing this. As for the conflict, I'll rebase this and fix it asap

Introduce PaletteCompat class
@mike-spa mike-spa force-pushed the migrationOfPaletteElements branch from 9defca8 to ed69724 Compare May 26, 2023 16:35
@mike-spa
Copy link
Contributor Author

done!

@DmitryArefiev
Copy link
Contributor

Cool! Thanks!

Tested #17581 on Win10, Mac13 - PASS

Merged

@DmitryArefiev DmitryArefiev merged commit 889492f into musescore:master May 27, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Where necessary, some palette items need to be force-reset in version 4.1
5 participants