Commit 7fecd7d3 authored by Ludovic Fauvet's avatar Ludovic Fauvet
Browse files

Timeline: Fix painting issue when items overlapping

parent 003473b5
......@@ -63,13 +63,23 @@ void GraphicsMovieItem::paint( QPainter* painter, const QStyleOptionGraphicsItem
gradient.setColorAt( 0, QColor::fromRgb( 32, 52, 142 ) );
gradient.setColorAt( 1, QColor::fromRgb( 43, 69, 181 ) );
painter->setPen( Qt::NoPen );
painter->setBrush( QBrush( gradient ) );
painter->drawRect( boundingRect() );
if ( isSelected() )
painter->setPen( QPen( Qt::yellow ) );
{
setZValue( Z_SELECTED );
painter->setPen( Qt::yellow );
}
else
painter->setPen( QPen( Qt::NoPen ) );
{
setZValue( Z_NOT_SELECTED );
painter->setPen( Qt::NoPen );
}
painter->setBrush( QBrush( gradient ) );
painter->drawRect( boundingRect() );
painter->setBrush( Qt::NoBrush );
painter->drawRect( boundingRect().adjusted( 0, 0, 0, -1 ) );
paintAudioSpectrum( painter );
updateTitle();
......
......@@ -28,6 +28,9 @@
#include "Clip.h"
#include "TracksView.h"
#define Z_SELECTED 4
#define Z_NOT_SELECTED 3
class GraphicsMovieItem : public AbstractGraphicsMediaItem
{
Q_OBJECT
......
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