Skip to content

Commit

Permalink
fix #287640: View Documents side by side displays wrong score name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmcclinch committed Apr 15, 2019
1 parent 25c8a3e commit 20f2080
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mscore/scoretab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ void ScoreTab::setCurrent(int n)
QList<Excerpt*>& excerpts = score->excerpts();
if (!excerpts.isEmpty()) {
tab2->blockSignals(true);
tab2->addTab(score->fileInfo()->completeBaseName().replace("&","&&"));
tab2->addTab(score->fileInfo()->completeBaseName().replace("&","&&") + (score->dirty() ? "*" : ""));
for (const Excerpt* excerpt : excerpts)
tab2->addTab(excerpt->title().replace("&","&&"));
tab2->setCurrentIndex(tsv->part);
Expand Down Expand Up @@ -283,7 +283,7 @@ void ScoreTab::updateExcerpts()
QList<Excerpt*>& excerpts = score->excerpts();
if (!excerpts.isEmpty()) {
tab2->blockSignals(true);
tab2->addTab(score->fileInfo()->completeBaseName().replace("&","&&"));
tab2->addTab(score->fileInfo()->completeBaseName().replace("&","&&") + (score->dirty() ? "*" : ""));
for (const Excerpt* excerpt : excerpts)
tab2->addTab(excerpt->title().replace("&","&&"));
tab2->blockSignals(false);
Expand Down Expand Up @@ -344,7 +344,7 @@ void ScoreTab::insertTab(MasterScore* s)
{
int idx = scoreList->indexOf(s);
tab->blockSignals(true);
tab->insertTab(idx, s->fileInfo()->completeBaseName().replace("&","&&"));
tab->insertTab(idx, s->fileInfo()->completeBaseName().replace("&","&&") + (s->dirty() ? "*" : ""));
tab->setTabData(idx, QVariant::fromValue<void*>(new TabScoreView(s)));
tab->blockSignals(false);
emit tabInserted(idx);
Expand All @@ -359,7 +359,7 @@ void ScoreTab::setTabText(int idx, const QString& s)
QString text(s);
text.replace("&","&&");
tab->setTabText(idx, text);
if (tab2)
if (tab2 && currentIndex() == idx)
tab2->setTabText(0, text);
emit tabRenamed(idx);
}
Expand Down

0 comments on commit 20f2080

Please sign in to comment.