Commit dd64b93d authored by Craig Watson's avatar Craig Watson

Don't draw dashed line around videoItem when selected

parent eb597bf2
...@@ -340,7 +340,6 @@ void UBGraphicsMediaItem::pause() ...@@ -340,7 +340,6 @@ void UBGraphicsMediaItem::pause()
void UBGraphicsMediaItem::stop() void UBGraphicsMediaItem::stop()
{ {
qDebug() << "stop requested";
mMediaObject->stop(); mMediaObject->stop();
mStopped = true; mStopped = true;
} }
...@@ -522,7 +521,11 @@ void UBGraphicsVideoItem::videoSizeChanged(QSizeF newSize) ...@@ -522,7 +521,11 @@ void UBGraphicsVideoItem::videoSizeChanged(QSizeF newSize)
void UBGraphicsVideoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void UBGraphicsVideoItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
QGraphicsRectItem::paint(painter, option, widget); // When selected, a QGraphicsRectItem is drawn with a dashed line border. We don't want this
QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option);
styleOption.state &= ~QStyle::State_Selected;
QGraphicsRectItem::paint(painter, &styleOption, widget);
UBGraphicsMediaItem::paint(painter, option, widget); UBGraphicsMediaItem::paint(painter, option, widget);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment