Better right-click behaviour, context menu on mouse-up instead of mouse down

This commit is contained in:
Sky
2014-03-16 20:34:30 +00:00
parent de2eb3fc54
commit 00a945d84b
2 changed files with 9 additions and 1 deletions

View File

@ -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)