Skip to content

Commit

Permalink
Fix updating selection in Timeline
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrio95 committed Apr 17, 2020
1 parent 94ed6c9 commit a1387b8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions mscore/timeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,12 @@ void Timeline::drawSelection()
255)));
_selectionPath.addRect(graphicsRectItem->rect());
}
else {
// Ensure unselected measures are not marked selected
QGraphicsRectItem* graphicsRectItem = qgraphicsitem_cast<QGraphicsRectItem*>(graphicsItem);
if (graphicsRectItem && graphicsRectItem->data(keyItemType).value<ItemType>() == ItemType::TYPE_MEASURE)
graphicsRectItem->setBrush(QBrush(colorBox(graphicsRectItem)));
}
}

if (selectionItem) {
Expand Down Expand Up @@ -2761,12 +2767,12 @@ void Timeline::mouseOver(QPointF pos)
QGraphicsRectItem* graphicsRectItem2 = qgraphicsitem_cast<QGraphicsRectItem*>(pairItem);
if (graphicsRectItem1) {
std::get<2>(_oldHoverInfo) = graphicsRectItem1->brush().color();
if (std::get<2>(_oldHoverInfo) != QColor(173,216,230))
if (std::get<2>(_oldHoverInfo) != activeTheme().selectionColor)
graphicsRectItem1->setBrush(QBrush(activeTheme().backgroundColor));
}
if (graphicsRectItem2) {
std::get<2>(_oldHoverInfo) = graphicsRectItem2->brush().color();
if (std::get<2>(_oldHoverInfo) != QColor(173,216,230))
if (std::get<2>(_oldHoverInfo) != activeTheme().selectionColor)
graphicsRectItem2->setBrush(QBrush(activeTheme().backgroundColor));
}
}
Expand Down

0 comments on commit a1387b8

Please sign in to comment.