ui: Refactored context menu API, added file path actions in graph and code

* Add 'copy full path' and 'show containing folder' actions to graph view, code view
* Added file path to file node tooltip

bug id = 320
This commit is contained in:
Eberhard Graether
2017-01-26 21:54:57 +01:00
parent 4fc0785002
commit 2aa8c4c22c
11 changed files with 185 additions and 94 deletions
+10 -1
View File
@@ -569,7 +569,16 @@ void QtCodeArea::contextMenuEvent(QContextMenuEvent* event)
if (m_setIDECursorPositionAction != nullptr)
{
m_eventPosition = event->pos();
QtContextMenu::getInstance()->showExtended(event, this, std::vector<QAction*>(1, m_setIDECursorPositionAction));
QtContextMenu menu(event, this);
if (!m_locationFile->getFilePath().empty())
{
menu.addSeparator();
menu.addFileActions(m_locationFile->getFilePath());
menu.addSeparator();
menu.addAction(m_setIDECursorPositionAction);
}
menu.show();
}
}