Permalink
Browse files

* Properly implemented FlexibleView's jumpToCurrentTrack.

  • Loading branch information...
1 parent 6ca7394 commit 7ac798c143b7388ddd4eeedcbcba45a2bb6802ab @muesli muesli committed Nov 14, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 src/libtomahawk/playlist/FlexibleView.cpp
@@ -268,10 +268,16 @@ FlexibleView::pixmap() const
bool
FlexibleView::jumpToCurrentTrack()
{
- m_trackView->jumpToCurrentTrack();
- m_detailedView->jumpToCurrentTrack();
- m_gridView->jumpToCurrentTrack();
- return true;
+ tDebug() << Q_FUNC_INFO;
+
+ bool b = false;
+
+ // note: the order of comparison is important here, if we'd write "b || foo" then foo will not be executed if b is already true!
+ b = m_trackView->jumpToCurrentTrack() || b;
+ b = m_detailedView->jumpToCurrentTrack() || b;
+ b = m_gridView->jumpToCurrentTrack() || b;
+
+ return b;
}

0 comments on commit 7ac798c

Please sign in to comment.