Skip to content

Commit

Permalink
Don't ask confirmation when reading corrupt or wrong version scores i…
Browse files Browse the repository at this point in the history
…n plugin's readScore, if non-interactive
  • Loading branch information
Jojo-Schmitz committed Sep 22, 2024
1 parent 33f2b19 commit 9b1746a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mscore/plugin/api/qmlpluginapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ bool PluginAPI::writeScore(Score* s, const QString& name, const QString& ext)

Score* PluginAPI::readScore(const QString& name, bool noninteractive)
{
bool oldConvertermode = converterMode;
bool oldIgnoreWarnings = ignoreWarnings;
converterMode = ignoreWarnings = !noninteractive;
Ms::Score* score = msc()->openScore(name, !noninteractive);
converterMode = oldConvertermode;
ignoreWarnings = oldIgnoreWarnings;
if (score) {
if (noninteractive)
score->setCreated(false);
Expand Down

0 comments on commit 9b1746a

Please sign in to comment.