]> git.cworth.org Git - apitrace/commitdiff
Show the lookup state menu on frames.
authorZack Rusin <zack@kde.org>
Sat, 7 May 2011 05:41:33 +0000 (01:41 -0400)
committerZack Rusin <zack@kde.org>
Sat, 7 May 2011 05:41:33 +0000 (01:41 -0400)
gui/mainwindow.cpp

index b5d20b1b2684e8258107e7f3e2b25dde62945259..9d8748d7699fe0c8e624d6bbdfaaa25259bf9425 100644 (file)
@@ -963,12 +963,14 @@ void MainWindow::customContextMenuRequested(QPoint pos)
 
     ApiTraceEvent *event =
         index.data(ApiTraceModel::EventRole).value<ApiTraceEvent*>();
-    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());
 }