Skip to content

Commit

Permalink
cheap fix for #54776
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Apr 10, 2015
1 parent ad9a625 commit 5b6d966
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions mscore/uploadscoredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,25 @@ namespace Ms {

void MuseScore::showUploadScoreDialog()
{
if (!currentScore())
return;
if (!currentScore()->sanityCheck()) {
QMessageBox msgBox;
msgBox.setWindowTitle(QObject::tr("MuseScore: Load Error"));
msgBox.setText(tr("This score is corrupted. Please fix the errors first."));
msgBox.setDetailedText(MScore::lastError);
msgBox.setTextFormat(Qt::RichText);
msgBox.setIcon(QMessageBox::Warning);
msgBox.setStandardButtons(QMessageBox::Ok);
msgBox.exec();
return;
}
if (uploadScoreDialog == nullptr) {
uploadScoreDialog = new UploadScoreDialog(_loginManager);
}

if (currentScore()) {
uploadScoreDialog->setTitle(currentScore()->title());
_loginManager->tryLogin();
}
uploadScoreDialog->setTitle(currentScore()->title());
_loginManager->tryLogin();
}

//---------------------------------------------------------
Expand Down

0 comments on commit 5b6d966

Please sign in to comment.