Changed: Enabled custom context menu signal to open a menu at the mouse position.

--HG--
branch : branch-features-geqt-plugin
This commit is contained in:
mattraykowski 2012-10-21 13:48:02 -07:00
parent f7ffb4b865
commit c5cafc7acc
2 changed files with 96 additions and 92 deletions

View file

@ -74,6 +74,10 @@ namespace GeorgesQt
m_form = 0;
m_ui.treeView->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_ui.treeView, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(showContextMenu(const QPoint&)));
connect(m_ui.treeView, SIGNAL(doubleClicked (QModelIndex)),
this, SLOT(doubleClicked (QModelIndex)));
connect(m_header, SIGNAL(headerClicked(int)),
@ -522,7 +526,7 @@ namespace GeorgesQt
// else if(item->getFormElm()->isAtom() && item->valueFrom() == NLGEORGES::UFormElm::ValueForm)
// contextMenu.addAction("Revert to parent/default...");
// QAction *selectedItem = contextMenu.exec(globalPos);
QAction *selectedItem = contextMenu.exec(QCursor::pos());
// if(selectedItem)
// {
// if(selectedItem->text() == "Add parent...")