X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/b8a4e0fac2820ec8fc442c2abeea700ae4947e01..6861a876830e301878b65cb4e4574bfda4c73340:/src/dolphincolumnwidget.cpp 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)