]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
IPAL20833 SIGSEGV at Clone View
authordmv <dmv@opencascade.com>
Thu, 29 Jan 2009 07:28:09 +0000 (07:28 +0000)
committerdmv <dmv@opencascade.com>
Thu, 29 Jan 2009 07:28:09 +0000 (07:28 +0000)
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewPort3d.h

index 78b825cb457a000142d963cc95d8af4774e9bb1a..46499449ae3c7db359d117c04af93d258de7d6a8 100755 (executable)
@@ -207,8 +207,13 @@ void OCCViewer_Viewer::onMouseMove(SUIT_ViewWindow* theWindow, QMouseEvent* theE
   if (!theWindow->inherits("OCCViewer_ViewWindow")) return;
 
   OCCViewer_ViewWindow* aView = (OCCViewer_ViewWindow*) theWindow;
-  if ( isSelectionEnabled() )
-    myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView->getViewPort()->getView());
+
+  if ( isSelectionEnabled() ) {
+    if (aView->getViewPort()->getBusy()) return;
+    Handle(V3d_View) aView3d = aView->getViewPort()->getView();
+    if ( !aView3d.IsNull() )
+      myAISContext->MoveTo(theEvent->x(), theEvent->y(), aView3d);
+  }
 }
 
 
index 10e01347e3e4a73deace6d49ab5b2d4d59323c59..7fc204ddd3a1e489df889386d10da86c93c4ac02 100755 (executable)
@@ -57,7 +57,8 @@ OCCViewer_ViewPort3d::OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_V
 : OCCViewer_ViewPort( parent ),
 myScale( 1.0 ),
 myDegenerated( true ),
-myAnimate( false )
+myAnimate( false ),
+myBusy( true )
 {
   selectVisualId();
 
@@ -459,6 +460,7 @@ void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e )
                    activeView()->Redraw( rc.x(), rc.y(), rc.width(), rc.height() );
        }
        OCCViewer_ViewPort::paintEvent( e );
+       myBusy = false;
 }
 
 /*!
index 13fb9bc86c6cadae18e1e70a8c87f5c8cbbc2f26..c8bec10f1f873cccdc15400757fe62de8cb7ec9f 100755 (executable)
@@ -74,6 +74,7 @@ public:
   void                 startRotation( int, int, int, const gp_Pnt& );
   void                 rotate( int, int, int, const gp_Pnt& );
   void                 endRotation();
+  bool                  getBusy() {return myBusy;}
 
 protected:
     // EVENTS
@@ -93,6 +94,7 @@ private:
   Handle(V3d_View)     myActiveView;
   bool                 myDegenerated;
   bool                  myAnimate;
+  bool                  myBusy;
   double               myScale;
 };