Bug 682

Summary: Context menu event can be ignored on channel labels and flags
Product: PulseView Reporter: jry <jrysig>
Component: OtherAssignee: Nobody <nobody>
Status: CONFIRMED ---    
Severity: normal CC: sascha-web-sigrok.org, soeren
Priority: Normal Keywords: low_hanging_fruit
Version: unreleased development snapshot   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Use event coordinates instead of cached mouse_point_

Description jry 2015-10-30 21:33:11 CET
How to reproduce: 
-right-click channel label (or flag label), context menu with Delete command is displayed
-move mouse to another label and right-click again, so context menu is closed
-don't move mouse cursor and right-click again
-context menu is not displayed

Reason: mouse_point_ is used in contextMenuEvent() handlers instead of event->pos(). In described situation mouse_point_ contains (-1, -1) from ViewWidget::leaveEvent(QEvent*).

Patch is attached.
Comment 1 jry 2015-10-30 21:37:20 CET
Created attachment 174 [details]
Use event coordinates instead of cached mouse_point_