From: Christoph Egger Date: Wed, 4 Mar 2015 14:17:50 +0000 (+0100) Subject: Make "Add Function" generally available X-Git-Tag: v0.1~76 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=34f333f55fd3577c06c8383e568cb32829a00ec1;p=frida%2Ffrida.git Make "Add Function" generally available Allows to create new Functions even if point is over an existing function --- diff --git a/src/gui/Mainwindow.cxx b/src/gui/Mainwindow.cxx index fe48f8f..a15aa66 100644 --- a/src/gui/Mainwindow.cxx +++ b/src/gui/Mainwindow.cxx @@ -133,10 +133,11 @@ void Mainwindow::showListContextMenu(const QPoint& point) { if (item) { QAction * act = menu.addAction("Rename Function"); connect(act, &QAction::triggered, [=]() {this->renameFunction(objects_list[item]->getFunction());}); - } else { - QAction * act = menu.addAction("AddFunction"); - connect(act, SIGNAL(triggered()), this, SLOT(requestNewFunction())); } + + QAction * act = menu.addAction("AddFunction"); + connect(act, SIGNAL(triggered()), this, SLOT(requestNewFunction())); + menu.exec(listWidget->mapToGlobal(point)); }