score migration autoplace fix

This commit is contained in:
Aaron Sattely 2022-02-10 12:14:38 -05:00
parent ad22a35aae
commit 2ad2d2f348
3 changed files with 7 additions and 2 deletions

View file

@ -5317,6 +5317,10 @@ void Score::doLayoutRange(const Fraction& st, const Fraction& et)
m_layoutOptions.updateFromStyle(style());
m_layout.doLayoutRange(m_layoutOptions, st, et);
if (_resetAutoplace) {
_resetAutoplace = false;
resetAllPositions();
}
}
UndoStack* Score::undoStack() const { return _masterScore->undoStack(); }

View file

@ -455,7 +455,7 @@ private:
///< saves will not overwrite the backup file.
bool _defaultsRead { false }; ///< defaults were read at MusicXML import, allow export of defaults in convertermode
ScoreOrder _scoreOrder; ///< used for score ordering
bool _resetAutoplace{ false };
int _mscVersion { MSCVERSION }; ///< version of current loading *.msc file
QMap<QString, QString> _metaTags;
@ -568,6 +568,7 @@ public:
void removeStaff(Staff*);
void addMeasure(MeasureBase*, MeasureBase*);
void linkMeasures(Score* score);
void setResetAutoplace() { _resetAutoplace = true; }
Excerpt* excerpt() { return _excerpt; }
void setExcerpt(Excerpt* e) { _excerpt = e; }

View file

@ -180,6 +180,6 @@ bool ProjectMigrator::applyEdwinStyle(Ms::MasterScore* score)
bool ProjectMigrator::resetAllElementsPositions(Ms::MasterScore* score)
{
score->resetAllPositions();
score->setResetAutoplace();
return true;
}