From: Zack Rusin Date: Sat, 7 May 2011 05:41:33 +0000 (-0400) Subject: Show the lookup state menu on frames. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=218015c3e3523d563726c4c8e120ba4d460cf762;p=apitrace Show the lookup state menu on frames. --- diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index b5d20b1..9d8748d 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -963,12 +963,14 @@ void MainWindow::customContextMenuRequested(QPoint pos) ApiTraceEvent *event = index.data(ApiTraceModel::EventRole).value(); - if (!event || event->type() != ApiTraceEvent::Call) + if (!event) return; menu.addAction(QIcon(":/resources/media-record.png"), tr("Lookup state"), this, SLOT(lookupState())); - menu.addAction(tr("Edit"), this, SLOT(editCall())); + if (event->type() == ApiTraceEvent::Call) { + menu.addAction(tr("Edit"), this, SLOT(editCall())); + } menu.exec(QCursor::pos()); }