diff options
| author | Peter Penz <[email protected]> | 2007-06-20 20:48:36 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-06-20 20:48:36 +0000 |
| commit | 15f50df9f6944bee79d5f81c8ccfc7bc206d9d99 (patch) | |
| tree | bc1a7313f6ef5062422501f83f82fd879fa1c60a /src/dolphincolumnview.cpp | |
| parent | cd780167c3921d3803d60f58564d2446325dd599 (diff) | |
don't pass a custom viewport URL to the context menu anymore, as this cannot work together with the menu actions
svn path=/trunk/KDE/kdebase/apps/; revision=678175
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 2941cab87..81337cb20 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -231,8 +231,15 @@ void ColumnWidget::contextMenuEvent(QContextMenuEvent* event) } QListView::contextMenuEvent(event); - const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos()); - m_view->m_controller->triggerContextMenuRequest(pos, m_url); + + const QModelIndex index = indexAt(event->pos()); + const KUrl& navigatorUrl = m_view->m_controller->url(); + if (index.isValid() || (m_url == navigatorUrl)) { + // Only open a context menu above an item or if the mouse is above + // the active column. + const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos()); + m_view->m_controller->triggerContextMenuRequest(pos); + } } void ColumnWidget::activate() |
