]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Bug 1: on windows XP \93View operation\94 tab appears after change of settings( from...
authorptv <ptv@opencascade.com>
Wed, 8 Apr 2009 14:11:51 +0000 (14:11 +0000)
committerptv <ptv@opencascade.com>
Wed, 8 Apr 2009 14:11:51 +0000 (14:11 +0000)
src/Plot2d/Plot2d_ViewFrame.cxx

index 8f228df66cc28d458db84836ff7baa4ce77ac32c..7d728f1cb86b8ad8fc747b60610601edd64fc9c9 100755 (executable)
@@ -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();