]> Creatis software - creaMaracasVisu.git/commitdiff
#3573 Bug Refresh windows
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 14 Jan 2025 08:51:18 +0000 (09:51 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 14 Jan 2025 08:51:18 +0000 (09:51 +0100)
bbtk/src/bbmaracasvisuShowNPoints.cxx
bbtk/src/bbmaracasvisuShowNPoints.h

index 279dc97d340730d2f87a2b9ccbb8a9ab7fc5112a..92de7f00cd446cc127c84742dbf559f1f5b47aa1 100644 (file)
@@ -116,15 +116,18 @@ void ShowNPoints::Process()
         //        if (firsttime==true)
         //        {
         //            firsttime=false;
-        if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==false )
+        if (onshowwidget==true)
         {
-            mwxwidget->DetectCollectionActive();
-        }
-        if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==true )
-        {
-            mwxwidget->GetModelShowNPoints()->SetFirstTime(false);
-            mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() ,  bbGetInputInitLstIndexs() );
-        }
+            if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==false )
+            {
+                mwxwidget->DetectCollectionActive();
+            }
+            if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==true )
+            {
+                mwxwidget->GetModelShowNPoints()->SetFirstTime(false);
+                mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() ,  bbGetInputInitLstIndexs() );
+            }
+        } // if onshowwidget
         //        } // firsttime OJO machete Eduardo pour ANDREAS a verificar
         mwxwidget->AutoAddPoints();
         mwxwidget->TrackingPoint();
@@ -150,6 +153,7 @@ void ShowNPoints::CreateWidget(wxWindow* parent)
 //-----------------------------------------------------------------
 void  ShowNPoints::OnShowWidget()
 {
+    onshowwidget=true;
     printf("EED ShowNPoints::OnShowWidget\n");
     mwxwidget->SetRenderer( bbGetInputRenderer() );
     mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() ,  bbGetInputInitLstIndexs() );
@@ -158,6 +162,7 @@ void  ShowNPoints::OnShowWidget()
 //-----------------------------------------------------------------
 void ShowNPoints::bbUserSetDefaultValues()
 {
+    onshowwidget= false;
     firsttime   = true;
     backOpacity = -1;
     mwxwidget   = NULL;
index 7c709a0bb7be7fcbd33fd0080c70c571d7ebfbc4..0f4277f8e5b8a257b28ce9f5d08a6837ddf2f4f4 100644 (file)
@@ -87,8 +87,9 @@ class /*BBTK_EXPORT*/ ShowNPoints
   void CreateWidget(wxWindow*);
   double backOpacity;
     
-  BBTK_ON_SHOW_WIDGET(OnShowWidget);
-  void OnShowWidget();
+    BBTK_ON_SHOW_WIDGET(OnShowWidget);
+    void OnShowWidget();
+    bool onshowwidget;
 
 private:
     bool                    firsttime;