From: ptv Date: Wed, 8 Apr 2009 14:11:51 +0000 (+0000) Subject: Bug 1: on windows XP “View operation” tab appears after change of settings( from... X-Git-Tag: CTH_15~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=afa562a6859f20f541ff0b0287000577f4e4af81;p=modules%2Fgui.git Bug 1: on windows XP “View operation” tab appears after change of settings( from Bug CTH21015 ) --- diff --git a/src/Plot2d/Plot2d_ViewFrame.cxx b/src/Plot2d/Plot2d_ViewFrame.cxx index 8f228df66..7d728f1cb 100755 --- a/src/Plot2d/Plot2d_ViewFrame.cxx +++ b/src/Plot2d/Plot2d_ViewFrame.cxx @@ -337,6 +337,17 @@ bool Plot2d_ViewFrame::eventFilter( QObject* watched, QEvent* e ) } 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 ); @@ -1588,12 +1599,6 @@ bool Plot2d_ViewFrame::plotMouseMoved( const QMouseEvent& me ) */ 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();