]> Creatis software - creaMaracasVisu.git/commitdiff
#3485 ShowNPionts for Multiple Groups vtk8itk5wx3-macos
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 20 Jul 2022 08:39:24 +0000 (10:39 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 20 Jul 2022 08:39:24 +0000 (10:39 +0200)
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx

index 74d9e6f6032841ffd6d56ac87aa3a520b4e2254d..091c02ee38f15a828f940cdc0e70265e70a6d11e 100644 (file)
@@ -41,6 +41,7 @@
     wxNotebook* bookGroupManager    = NULL;
     wxPanel*    panel               = NULL;
     wxPanel*    panel2              = NULL;
+                txtNrCollections    = NULL;
 
       bookSetPoints     = new wxNotebook(panelParent,
                           -1,
@@ -48,7 +49,7 @@
                           wxDefaultSize,
                           wxNB_TOP );
       panel  = new wxPanel(bookSetPoints);
-
+      txtNrCollections = NULL;
 
     // Group Manager
     if (mtype==4)
@@ -1010,10 +1011,13 @@ void WidgetShowNPoints::RefreshColourCollection()
 //------------------------------------------------------------------------
 void WidgetShowNPoints::RefreshCollectionText()
 {
-    wxString strTmp;
-    strTmp.Printf(_T("%d   /  %d "),  (int)mActualCollection+1, (int)lstModelShowNPoints.size() );
-    txtNrCollections->SetLabel( strTmp );
-    SetOutputBox();
+    if ((mtype==4) && (txtNrCollections!=NULL))  // Just for Collection interface
+    {
+        wxString strTmp;
+        strTmp.Printf(_T("%d   /  %d "),  (int)mActualCollection+1, (int)lstModelShowNPoints.size() );
+        txtNrCollections->SetLabel( strTmp );
+        SetOutputBox();
+    } // if mtype 4
 }
 
 //------------------------------------------------------------------------