From: vsr Date: Fri, 10 Nov 2017 12:48:13 +0000 (+0300) Subject: 0023502: EDF 15840 - SIGSEGV when editing manually clipping plane X-Git-Tag: V8_4_0rc3~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=577ad4e25a66abffc7faa1ece7dae38dc9346ead;p=modules%2Fgui.git 0023502: EDF 15840 - SIGSEGV when editing manually clipping plane --- diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx index a187df537..39d6c0a12 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx @@ -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; } diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index 3659c59e7..dc5767654 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -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();