}
break;
}
+ case QEvent::ContextMenu: {
+ if ( myOperation == NoOpId )
+ {
+ QContextMenuEvent* me = (QContextMenuEvent*)e;
+ QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
+ me->pos(), me->globalPos() );
+ emit contextMenuRequested( &aEvent );
+ return true;
+ }
+ break;
+ }
}
}
return QWidget::eventFilter( watched, e );
*/
void Plot2d_ViewFrame::plotMouseReleased( const QMouseEvent& me )
{
- if ( myOperation == NoOpId && me.button() == Qt::RightButton && me.modifiers() != Qt::ControlModifier )
- {
- QContextMenuEvent aEvent( QContextMenuEvent::Mouse,
- me.pos(), me.globalPos() );
- emit contextMenuRequested( &aEvent );
- }
myPlot->canvas()->setCursor( QCursor( Qt::CrossCursor ) );
myPlot->defaultPicker();