Skip to content

Commit

Permalink
Fix #87 and #34 - fix issues with the caret redrawing when changing s…
Browse files Browse the repository at this point in the history
…ystems.
  • Loading branch information
cameronwhite committed Sep 1, 2014
1 parent 7408375 commit d3f31a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/painters/caretpainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,14 @@ void CaretPainter::onLocationChanged()
system.getStaves()[i], i).getStaffHeight();
}

update(boundingRect());
const QRectF oldRect = sceneBoundingRect();
setPos(0, mySystemRects.at(location.getSystemIndex()).top() + offset +
myLayout->getSystemSymbolSpacing() + myLayout->getStaffHeight() -
myLayout->getTabStaffBelowSpacing() - myLayout->STAFF_BORDER_SPACING -
myLayout->getTabStaffHeight());
update(boundingRect());
// Ensure that a redraw always occurs at the old location.
scene()->update(oldRect);

setToolTip(QString::fromStdString(
boost::lexical_cast<std::string>(location)));
Expand Down

0 comments on commit d3f31a1

Please sign in to comment.