Fixed coordinates for menu

This commit is contained in:
Magne Sjaastad 2015-08-06 15:51:27 +02:00
parent a9e7a8f461
commit 86f062ad7e

View File

@ -2222,5 +2222,8 @@ void RiuMainWindow::customMenuRequested(const QPoint& pos)
menu.addAction(actions[i]);
}
menu.exec(pos);
// Qt doc: QAbstractScrollArea and its subclasses that map the context menu event to coordinates of the viewport().
QPoint globalPos = m_projectTreeView->treeView()->viewport()->mapToGlobal(pos);
menu.exec(globalPos);
}