Salome HOME
0023502: EDF 15840 - SIGSEGV when editing manually clipping plane
authorvsr <vsr@opencascade.com>
Fri, 10 Nov 2017 12:48:13 +0000 (15:48 +0300)
committervsr <vsr@opencascade.com>
Fri, 10 Nov 2017 12:50:26 +0000 (15:50 +0300)
src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx
src/OCCViewer/OCCViewer_ClippingDlg.cxx

index a187df5378cc6a47bfe60f566dbef457c2303b66..39d6c0a129dff14d2147199ec185caf6aab20ab1 100644 (file)
@@ -220,10 +220,10 @@ bool OCCViewer_ClipPlaneInteractor::startDragging( const QPoint& thePickPos,
 
   gp_Pnt aPickPoint = aFindPick.Point( 1 );
 
-  const gp_Dir& aPlaneN      = aPlanePln.Axis().Direction();
-  const gp_Dir& aPlaneX      = aPlanePln.XAxis().Direction();
-  const gp_Dir& aPlaneY      = aPlanePln.YAxis().Direction();
-  const gp_Pnt& aPlaneCenter = aPlanePln.Location();
+  gp_Dir aPlaneN      = aPlanePln.Axis().Direction();
+  gp_Dir aPlaneX      = aPlanePln.XAxis().Direction();
+  gp_Dir aPlaneY      = aPlanePln.YAxis().Direction();
+  gp_Pnt aPlaneCenter = aPlanePln.Location();
 
   switch ( theDragOp )
   {
@@ -615,6 +615,7 @@ bool OCCViewer_ClipPlaneInteractor::mouseRelease( QMouseEvent* theEvent,
   myInteractedPlane = NULL;
   myIsDraggable     = false;
   myIsClickable     = false;
+  myViewer->getAISContext()->ClearSelected( Standard_True );
   return true;
 }
 
index 3659c59e78b0fec1231d3ed72f9cbe72df08f9a1..dc5767654c45874f3e0260d875d2554f2ac3faa1 100644 (file)
@@ -636,8 +636,10 @@ OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCV
 
   OCCViewer_ViewManager* aViewMgr = (OCCViewer_ViewManager*) myModel->getViewManager();
   myInteractor = new OCCViewer_ClipPlaneInteractor( aViewMgr, this );
-  connect( myInteractor, SIGNAL( planeClicked( const Handle(AIS_Plane)& ) ), SLOT( onPlaneClicked( const Handle(AIS_Plane)& ) ) );
-  connect( myInteractor, SIGNAL( planeDragged( const Handle(AIS_Plane)& ) ), SLOT( onPlaneDragged( const Handle(AIS_Plane)& ) ) );
+  connect( myInteractor, SIGNAL( planeClicked( const Handle_AIS_Plane& ) ),
+          SLOT( onPlaneClicked( const Handle_AIS_Plane& ) ) );
+  connect( myInteractor, SIGNAL( planeDragged( const Handle_AIS_Plane& ) ),
+          SLOT( onPlaneDragged( const Handle_AIS_Plane& ) ) );
 
   myLocalPlanes = myModel->getClipPlanes();
   synchronize();