Skip to content

Commit

Permalink
* Don't react to hover events unless TrackView is in Detailed mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli authored and Michael Zanetti committed Sep 4, 2011
1 parent e0d1289 commit 4dfb989
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/libtomahawk/playlist/trackview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ TrackView::updateHoverIndex( const QPoint& pos )
repaint();
}

if ( m_model->style() == TrackModel::Short )
if ( m_model->style() == TrackModel::Short || m_model->style() == TrackModel::ShortWithAvatars )
return;

if ( idx.column() == TrackModel::Artist || idx.column() == TrackModel::Album )
Expand Down Expand Up @@ -519,8 +519,11 @@ void
TrackView::mousePressEvent( QMouseEvent* event )
{
QTreeView::mousePressEvent( event );
QModelIndex idx = indexAt( event->pos() );

if ( m_model->style() == TrackModel::Short || m_model->style() == TrackModel::ShortWithAvatars )
return;

QModelIndex idx = indexAt( event->pos() );
if ( event->pos().x() > header()->sectionViewportPosition( idx.column() ) + header()->sectionSize( idx.column() ) - 16 &&
event->pos().x() < header()->sectionViewportPosition( idx.column() ) + header()->sectionSize( idx.column() ) )
{
Expand Down

0 comments on commit 4dfb989

Please sign in to comment.