From be0ca31b9f1e6ab11a42106d572b54f1ce260b33 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Sun, 20 Sep 2020 21:17:49 +0200 Subject: [PATCH] clear selected points on bathymetry when switch off selection mode --- src/HYDROGUI/HYDROGUI_BathymetryPrs.cxx | 1 + src/HYDROGUI/HYDROGUI_BathymetryPrs.h | 1 + src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx | 1 + 3 files changed, 3 insertions(+) diff --git a/src/HYDROGUI/HYDROGUI_BathymetryPrs.cxx b/src/HYDROGUI/HYDROGUI_BathymetryPrs.cxx index 3dc4ab96..1b7b1b2c 100644 --- a/src/HYDROGUI/HYDROGUI_BathymetryPrs.cxx +++ b/src/HYDROGUI/HYDROGUI_BathymetryPrs.cxx @@ -353,6 +353,7 @@ void HYDROGUI_BathymetryPrs::ClearSelected() Handle(Prs3d_Presentation) aSelectPrs = GetSelectPresentation( NULL ); if( !aSelectPrs.IsNull() ) aSelectPrs->Clear(); + //mySelectedPoints.clear(); } void HYDROGUI_BathymetryPrs::SetTextLabels( const QVector& theTextIndices ) diff --git a/src/HYDROGUI/HYDROGUI_BathymetryPrs.h b/src/HYDROGUI/HYDROGUI_BathymetryPrs.h index 26154eb6..dcce6a9a 100644 --- a/src/HYDROGUI/HYDROGUI_BathymetryPrs.h +++ b/src/HYDROGUI/HYDROGUI_BathymetryPrs.h @@ -47,6 +47,7 @@ public: const SelectMgr_SequenceOfOwner& theOwners ); virtual void ClearSelected(); + virtual void ClearSelectedPoints() {mySelectedPoints.clear();}; void SetTextLabels( const QVector& ); diff --git a/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx b/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx index aa21b004..d64a4a2e 100644 --- a/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx +++ b/src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx @@ -144,6 +144,7 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive ) foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths ) { bath->ClearSelected(); + bath->ClearSelectedPoints(); bath->SetAutoHilight( Standard_True ); bath->GetShape()->TextLabels( false ); ctx->Deactivate( bath ); -- 2.39.2