From 577ad4e25a66abffc7faa1ece7dae38dc9346ead Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 10 Nov 2017 15:48:13 +0300 Subject: [PATCH] 0023502: EDF 15840 - SIGSEGV when editing manually clipping plane --- src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx | 9 +++++---- src/OCCViewer/OCCViewer_ClippingDlg.cxx | 6 ++++-- 2 files changed, 9 insertions(+), 6 deletions(-) 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(); -- 2.39.2