Avoid leaking the track grip QPixmap at each paintEvent (#5590)
This commit is contained in:
committed by
GitHub
parent
04d8c0db06
commit
dc3e8cab45
@@ -459,8 +459,6 @@ private slots:
|
||||
void clearTrack();
|
||||
|
||||
private:
|
||||
static QPixmap * s_grip;
|
||||
|
||||
TrackView * m_trackView;
|
||||
|
||||
QPushButton * m_trackOps;
|
||||
|
||||
@@ -1830,10 +1830,6 @@ void TrackContentWidget::setEmbossColor( const QBrush & c )
|
||||
// trackOperationsWidget
|
||||
// ===========================================================================
|
||||
|
||||
|
||||
QPixmap * TrackOperationsWidget::s_grip = NULL; /*!< grip pixmap */
|
||||
|
||||
|
||||
/*! \brief Create a new trackOperationsWidget
|
||||
*
|
||||
* The trackOperationsWidget is the grip and the mute button of a track.
|
||||
@@ -1960,17 +1956,11 @@ void TrackOperationsWidget::paintEvent( QPaintEvent * pe )
|
||||
|
||||
if( m_trackView->isMovingTrack() == false )
|
||||
{
|
||||
s_grip = new QPixmap( embed::getIconPixmap(
|
||||
"track_op_grip" ) );
|
||||
|
||||
p.drawPixmap( 2, 2, *s_grip );
|
||||
p.drawPixmap( 2, 2, embed::getIconPixmap("track_op_grip"));
|
||||
}
|
||||
else
|
||||
{
|
||||
s_grip = new QPixmap( embed::getIconPixmap(
|
||||
"track_op_grip_c" ) );
|
||||
|
||||
p.drawPixmap( 2, 2, *s_grip );
|
||||
p.drawPixmap( 2, 2, embed::getIconPixmap("track_op_grip_c"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user