From: Peter Penz Date: Wed, 18 Jun 2008 20:01:25 +0000 (+0000) Subject: it's assured that when requesting a context menu that the column is marked as active X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/84376acc848475e4aa03408fd9a5255c201e697d?ds=sidebyside it's assured that when requesting a context menu that the column is marked as active svn path=/trunk/KDE/kdebase/apps/; revision=821938 --- diff --git a/src/dolphincolumnwidget.cpp b/src/dolphincolumnwidget.cpp index 6d983f71f..3b94d42ac 100644 --- a/src/dolphincolumnwidget.cpp +++ b/src/dolphincolumnwidget.cpp @@ -386,6 +386,7 @@ void DolphinColumnWidget::contextMenuEvent(QContextMenuEvent* event) Q_ASSERT(m_view->m_controller->itemView() == this); m_view->m_controller->triggerUrlChangeRequest(m_url); } + Q_ASSERT(m_active); QListView::contextMenuEvent(event); @@ -394,13 +395,9 @@ void DolphinColumnWidget::contextMenuEvent(QContextMenuEvent* event) clearSelection(); } - if (index.isValid() || m_active) { - // 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()); - Q_ASSERT(m_view->m_controller->itemView() == this); - m_view->m_controller->triggerContextMenuRequest(pos); - } + const QPoint pos = m_view->viewport()->mapFromGlobal(event->globalPos()); + Q_ASSERT(m_view->m_controller->itemView() == this); + m_view->m_controller->triggerContextMenuRequest(pos); } void DolphinColumnWidget::wheelEvent(QWheelEvent* event)