diff --git a/libmscore/cmd.cpp b/libmscore/cmd.cpp index 3139ce135287b..9cad1ffb36ac0 100644 --- a/libmscore/cmd.cpp +++ b/libmscore/cmd.cpp @@ -2110,11 +2110,11 @@ static void resetElementPosition(void*, Element* e) // cmdResetAllPositions //--------------------------------------------------------- -void Score::cmdResetAllPositions() +void Score::cmdResetAllPositions(bool undoable) { - startCmd(); + if (undoable) startCmd(); scanElements(nullptr, resetElementPosition); - endCmd(); + if (undoable) endCmd(); } //--------------------------------------------------------- diff --git a/libmscore/score.h b/libmscore/score.h index 34ae90ecbc313..e3e223fab844e 100644 --- a/libmscore/score.h +++ b/libmscore/score.h @@ -624,7 +624,7 @@ class Score : public QObject, public ScoreElement { void cmdAddOttava(OttavaType); void cmdAddStretch(qreal); void cmdResetNoteAndRestGroupings(); - void cmdResetAllPositions(); + void cmdResetAllPositions(bool undoable = true); void cmdDoubleDuration() { cmdIncDecDuration(-1, false); } void cmdHalfDuration() { cmdIncDecDuration( 1, false); } void cmdIncDurationDotted() { cmdIncDecDuration(-1, true); } diff --git a/mscore/musescore.cpp b/mscore/musescore.cpp index a2132622d5648..6b9086904aae9 100644 --- a/mscore/musescore.cpp +++ b/mscore/musescore.cpp @@ -2575,17 +2575,17 @@ void MuseScore::askResetOldScorePositions(Score* score) if (resPref == "No") return; else if (resPref == "Yes") - score->cmdResetAllPositions(); + score->cmdResetAllPositions(false); else { // either set to "Ask" or not at all QMessageBox msgBox; QCheckBox ask; - ask.setText(tr("Don't ask me again.")); + ask.setText(tr("Remember my choice and don't ask again.")); ask.setToolTip(tr("You can change this behaviour any time in 'Preferences… > Import > Reset Element Positions'")); msgBox.setCheckBox(&ask); QString question = tr("Reset the positions of all elements?"); msgBox.setWindowTitle(question); - msgBox.setText(tr("To best take advantage of automatic placement in MuseScore 3 when importing '%1' from MuseScore %2, it is recommended to reset the positions of all elements.") - .arg(score->masterScore()->fileInfo()->completeBaseName(), score->mscoreVersion()) + "\n\n" + question); + msgBox.setText(tr("To best take advantage of automatic placement in MuseScore %1 when importing '%2' from MuseScore %3, it is recommended to reset the positions of all elements.") + .arg(VERSION).arg(score->masterScore()->fileInfo()->completeBaseName(), score->mscoreVersion()) + "\n\n" + question); msgBox.setIcon(QMessageBox::Question); msgBox.setStandardButtons( QMessageBox::Yes | QMessageBox::No @@ -2593,7 +2593,7 @@ void MuseScore::askResetOldScorePositions(Score* score) int res = msgBox.exec(); if (res == QMessageBox::Yes) - score->cmdResetAllPositions(); + score->cmdResetAllPositions(false); if (ask.checkState() == Qt::Checked) preferences.setPreference(PREF_IMPORT_COMPATIBILITY_RESET_ELEMENT_POSITIONS, res == QMessageBox::No? "Yes" : "No"); }