diff options
-rw-r--r-- | gui/MainWindow.cpp | 2 | ||||
-rw-r--r-- | gui/groupview/GroupView.cpp | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gui/MainWindow.cpp b/gui/MainWindow.cpp index 17d4630b..3ab93ba9 100644 --- a/gui/MainWindow.cpp +++ b/gui/MainWindow.cpp @@ -177,7 +177,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi view->setFrameShape(QFrame::NoFrame); view->setModel(proxymodel); - view->setContextMenuPolicy(Qt::CustomContextMenu); + //view->setContextMenuPolicy(Qt::CustomContextMenu); connect(view, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(showInstanceContextMenu(const QPoint &))); diff --git a/gui/groupview/GroupView.cpp b/gui/groupview/GroupView.cpp index b650efee..342e2523 100644 --- a/gui/groupview/GroupView.cpp +++ b/gui/groupview/GroupView.cpp @@ -380,6 +380,14 @@ void GroupView::mouseReleaseEvent(QMouseEvent *event) bool click = (index == m_pressedIndex && index.isValid()) || (m_pressedCategory && m_pressedCategory == categoryAt(geometryPos)); + bool isRight = event->button() == Qt::RightButton; + + if((index == m_pressedIndex && index.isValid()) && isRight) + { + emit customContextMenuRequested(event->pos()); + return; + } + if (click && m_pressedCategory) { if (state() == ExpandingState) |