From f42aca9a02945ae09af1643dbf82606733d8c406 Mon Sep 17 00:00:00 2001 From: nowrep Date: Wed, 11 Apr 2012 19:27:12 +0200 Subject: [PATCH] Fixed position of context menu in ArtistView and TrackView - using viewport()->mapToGlobal() as QTreeView is subclass of QAbstractScrollArea --- src/libtomahawk/playlist/artistview.cpp | 2 +- src/libtomahawk/playlist/trackview.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libtomahawk/playlist/artistview.cpp b/src/libtomahawk/playlist/artistview.cpp index 351c76d48..45f55ca19 100644 --- a/src/libtomahawk/playlist/artistview.cpp +++ b/src/libtomahawk/playlist/artistview.cpp @@ -384,7 +384,7 @@ ArtistView::onCustomContextMenu( const QPoint& pos ) m_contextMenu->setArtists( artists ); m_contextMenu->setAlbums( albums ); - m_contextMenu->exec( mapToGlobal( pos ) ); + m_contextMenu->exec( viewport()->mapToGlobal( pos ) ); } diff --git a/src/libtomahawk/playlist/trackview.cpp b/src/libtomahawk/playlist/trackview.cpp index 35ed48376..7939596b1 100644 --- a/src/libtomahawk/playlist/trackview.cpp +++ b/src/libtomahawk/playlist/trackview.cpp @@ -567,7 +567,7 @@ TrackView::onCustomContextMenu( const QPoint& pos ) } m_contextMenu->setQueries( queries ); - m_contextMenu->exec( mapToGlobal( pos ) ); + m_contextMenu->exec( viewport()->mapToGlobal( pos ) ); }