OK, I believe I've solved this for the code I needed to change. I am
replacing that line of code with the first example in #2 below. That
code resides in exportFile(), and it still requires page mode to be
set. I see now that the places where switchToPageMode() was removed in
saveAs() are preempted by that same #2 block of code at the top of
saveAs() - previously setting page mode multiple times, now setting page
mode only once.
I am still curious, though, why not keep switchToPageMode() and have it
wrap that #2 block of code? Isn't that what it was previously anyway?
I see that previously it also created an undo stack, but why not simply
change the contents of switchToPageMode() instead of eliminating it?
Thanks,
--
Sideways
On 5/24/2016 11:38 AM, Sideways Skullfinger wrote:
This change happened 6 days ago in the PR to "update continuous view"
here
<https://github.com/musescore/MuseScore/commit/b448ab9c309708a58adaaaef9f194dc30596944b#diff-da9ebe454eaee33caed3ff939a69dbae>.
I'm assuming this is a good thing, but I'd like to understand what
happened, and more importantly: how to replace instances of
switchToPageMode().
Looking at mscore/file.cpp, I see two different ways that is has been
replaced:
1) Removing the line of code - i.e. it's no longer necessary
2) Replacing it with these lines of code:
if (layoutMode != LayoutMode::PAGE) {
s->setLayoutMode(LayoutMode::PAGE);
s->doLayout();
}
or similarly:
if (layoutMode != s->layoutMode()) {
s->setLayoutMode(layoutMode);
s->doLayout();
}
I am working with SVG exports and I used to have call
switchToPageMode() prior to running the SVG export code, which
iterates over all the elements in the score by page by system.
Should I simply remove my call to switchToPageMode(), or should I
replace it with one of the blocks I quote above in #2?
Thanks,
Sideways
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer
------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer