Skip to content
Permalink
Browse files

fix #21841: Score tab and navigator remains after closing a score

  • Loading branch information...
lasconic committed May 19, 2014
1 parent 445058c commit 56177c3077ce4bf6e161af75d4da5f98c122d5c4
Showing with 10 additions and 4 deletions.
  1. +6 −2 mscore/musescore.cpp
  2. +4 −2 mscore/navigator.cpp
@@ -1522,10 +1522,11 @@ void MuseScore::setCurrentScoreView(ScoreView* view)
}
#endif
if (!cs) {
changeState(STATE_DISABLED);
setWindowTitle("MuseScore");
if (_navigator && _navigator->widget())
if (_navigator && _navigator->widget()) {
navigator()->setScoreView(view);
navigator()->setScore(0);
}
if (inspector)
inspector->setElement(0);
viewModeCombo->setEnabled(false);
@@ -1538,6 +1539,7 @@ void MuseScore::setCurrentScoreView(ScoreView* view)
_pianoTools->hide();
if (_drumTools)
_drumTools->hide();
changeState(STATE_DISABLED);
return;
}
viewModeCombo->setEnabled(true);
@@ -2001,6 +2003,8 @@ void MuseScore::removeTab(int i)
f.remove();
}
delete score;
// Shouldn't be necessary... but fix #21841
update();
}

//---------------------------------------------------------
@@ -138,7 +138,9 @@ void Navigator::setScoreView(ScoreView* v)
}
else {
_score = 0;
update();
updateViewRect();
//update() should be enough... see #21841
repaint();
}
}

@@ -297,7 +299,7 @@ void Navigator::paintEvent(QPaintEvent* ev)
{
QPainter p(this);
QRect r(ev->rect());
p.fillRect(r, Qt::gray);
p.fillRect(r, palette().color(QPalette::Window));

// qDebug("navigator paint %d %d", r.width(), r.height());

0 comments on commit 56177c3

Please sign in to comment.
You can’t perform that action at this time.