Skip to content

Commit

Permalink
fix crash on click on compact track label button (#3463)
Browse files Browse the repository at this point in the history
Fixes #3454
  • Loading branch information
BaraMGB authored and lukas-w committed Mar 30, 2017
1 parent 1bfd093 commit f8bf07b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/gui/widgets/TrackLabelButton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,21 @@ TrackLabelButton::TrackLabelButton( TrackView * _tv, QWidget * _parent ) :
setAcceptDrops( true );
setCursor( QCursor( embed::getIconPixmap( "hand" ), 3, 3 ) );
setToolButtonStyle( Qt::ToolButtonTextBesideIcon );

m_renameLineEdit = new QLineEdit( this );
m_renameLineEdit->hide();

if( ConfigManager::inst()->value( "ui", "compacttrackbuttons" ).toInt() )
{
setFixedSize( 32, 29 );
}
else
{
setFixedSize( 160, 29 );
m_renameLineEdit = new QLineEdit( this );
m_renameLineEdit->move( 30, ( height() / 2 ) - ( m_renameLineEdit->sizeHint().height() / 2 ) );
m_renameLineEdit->setFixedWidth( width() - 33 );
m_renameLineEdit->hide();
connect( m_renameLineEdit, SIGNAL( editingFinished() ), this, SLOT( renameFinished() ) );
}

setIconSize( QSize( 24, 24 ) );
connect( m_trackView->getTrack(), SIGNAL( dataChanged() ), this, SLOT( update() ) );
connect( m_trackView->getTrack(), SIGNAL( nameChanged() ), this, SLOT( nameChanged() ) );
Expand Down

0 comments on commit f8bf07b

Please sign in to comment.