From 2a7bf8992b774124851983a7bda4fd41a3f66f14 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Thu, 26 May 2022 06:23:05 +0200 Subject: [PATCH] #3485 ShowNPionts for Multiple Groups --- .../src/interface/wxWindows/widgets/WidgetShowNPoints.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx index 8b17078..f97d8cd 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx @@ -793,11 +793,15 @@ void WidgetShowNPoints::OnInsertCollectionAfter(wxCommandEvent &event) //------------------------------------------------------------------------ void WidgetShowNPoints::OnDeleteCollection(wxCommandEvent &event) { - if ( lstModelShowNPoints.size()>=1 ) + if ( lstModelShowNPoints.size()>1 ) { DeleteAllPoints(); // Actual Collection lstModelShowNPoints.erase( lstModelShowNPoints.begin()+mActualCollection ); - mActualCollection--; + lstViewShowNPoints.erase( lstViewShowNPoints.begin()+mActualCollection ); + if ( mActualCollection>=lstModelShowNPoints.size() ) + { + mActualCollection--; + } // if } RefreshCollectionText(); } -- 2.47.1