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);
+ }
}
: OCCViewer_ViewPort( parent ),
myScale( 1.0 ),
myDegenerated( true ),
-myAnimate( false )
+myAnimate( false ),
+myBusy( true )
{
selectVisualId();
activeView()->Redraw( rc.x(), rc.y(), rc.width(), rc.height() );
}
OCCViewer_ViewPort::paintEvent( e );
+ myBusy = false;
}
/*!
void startRotation( int, int, int, const gp_Pnt& );
void rotate( int, int, int, const gp_Pnt& );
void endRotation();
+ bool getBusy() {return myBusy;}
protected:
// EVENTS
Handle(V3d_View) myActiveView;
bool myDegenerated;
bool myAnimate;
+ bool myBusy;
double myScale;
};