projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b4802f
)
Header: Handle RowItems that do not create a context menu
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sat, 1 Nov 2014 10:05:32 +0000
(10:05 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Wed, 19 Nov 2014 10:23:02 +0000
(10:23 +0000)
pv/view/header.cpp
patch
|
blob
|
history
diff --git
a/pv/view/header.cpp
b/pv/view/header.cpp
index 8377cb2cfc481e76d932b68c47e35cc14bd5edec..fdfd896f2ac877339412ed415722cb5789101ba7 100644
(file)
--- a/
pv/view/header.cpp
+++ b/
pv/view/header.cpp
@@
-268,9
+268,14
@@
void Header::leaveEvent(QEvent*)
void Header::contextMenuEvent(QContextMenuEvent *event)
{
const shared_ptr<RowItem> r = get_mouse_over_row_item(_mouse_point);
+ if (!r)
+ return;
+
+ QMenu *const menu = r->create_context_menu(this);
+ if (!menu)
+ return;
- if (r)
- r->create_context_menu(this)->exec(event->globalPos());
+ menu->exec(event->globalPos());
}
void Header::keyPressEvent(QKeyEvent *e)