From afa562a6859f20f541ff0b0287000577f4e4af81 Mon Sep 17 00:00:00 2001 From: ptv Date: Wed, 8 Apr 2009 14:11:51 +0000 Subject: [PATCH] =?utf8?q?Bug=201:=20on=20windows=20XP=20=C2=93View=20oper?= =?utf8?q?ation=C2=94=20tab=20appears=20after=20change=20of=20settings(=20?= =?utf8?q?from=20Bug=20CTH21015=20)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/Plot2d/Plot2d_ViewFrame.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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(); -- 2.39.2