]> Creatis software - creaMaracasVisu.git/commitdiff
#3573 Bug Refresh windows
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 13 Jan 2025 16:06:56 +0000 (17:06 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Mon, 13 Jan 2025 16:06:56 +0000 (17:06 +0100)
bbtk/src/bbmaracasvisuShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx

index 1e5c5283349c6940e3ed7ba2d1ce6abe41569aa7..94a80a9642c94a4ad86053fde78898f55eb53241 100644 (file)
@@ -99,6 +99,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ShowNPoints,bbtk::WxBlackBox);
 //-----------------------------------------------------------------
 void ShowNPoints::Process()
 {
+    printf("EED ShowNPoints::Process start \n");
        if (mwxwidget!=NULL)
        {
         mwxwidget->SetImage( bbGetInputImage() );
@@ -107,6 +108,7 @@ void ShowNPoints::Process()
                mwxwidget->SetColour( bbGetInputColour() );
 //             mwxwidget->SetOpacity( bbGetInputOpacity() );
                mwxwidget->SetRadio( bbGetInputRadio() );
+        printf("EED ShowNPoints::Process flag 1 \n");
         if ( backOpacity!=bbGetInputOpacity() )
         {
             backOpacity = bbGetInputOpacity();
@@ -117,16 +119,22 @@ void ShowNPoints::Process()
 //            firsttime=false;
             if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==false )
             {
+                printf("EED ShowNPoints::Process flag 2.1 \n");
                 mwxwidget->DetectCollectionActive();
+                printf("EED ShowNPoints::Process flag 2.2 \n");
             }
             if ( mwxwidget->GetModelShowNPoints()->GetFirstTime()==true )
             {
+                printf("EED ShowNPoints::Process flag 3 \n");
                 mwxwidget->GetModelShowNPoints()->SetFirstTime(false);
                 mwxwidget->SetInitLstPoints( bbGetInputInitLstPointsX() , bbGetInputInitLstPointsY() , bbGetInputInitLstPointsZ() , bbGetInputInitLstLabels() ,  bbGetInputInitLstIndexs() );
             }
 //        } // firsttime OJO machete Eduardo pour ANDREAS a verificar
+        printf("EED ShowNPoints::Process flag 10 \n");
         mwxwidget->AutoAddPoints();
+        printf("EED ShowNPoints::Process flag 20 \n");
         mwxwidget->TrackingPoint();
+        printf("EED ShowNPoints::Process flag 30 \n");
         bbSetOutputlstPointsX( mwxwidget->GetLstPointsX()               );
         bbSetOutputlstPointsY( mwxwidget->GetLstPointsY()               );
         bbSetOutputlstPointsZ( mwxwidget->GetLstPointsZ()               );
@@ -135,6 +143,7 @@ void ShowNPoints::Process()
         bbSetOutputlstSelectedIndexs( mwxwidget->GetLstSelectedIndexs() );
         bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)mwxwidget );
        } // mwxwidget
+    printf("EED ShowNPoints::Process end \n");
 }
 
 //-----------------------------------------------------------------
index 0bd5f745c259d60c79b38abded04c9dc2fd183ee..909184803f2278104fc84cf213ef068619524309 100644 (file)
@@ -56,7 +56,10 @@ void ViewShowNPoints::RefreshEachPoint()
 void ViewShowNPoints::RefreshPoints()
 {
     RefreshEachPoint();
-    renderer->GetRenderWindow()->Render();
+    if (renderer!=NULL) 
+    {
+        renderer->GetRenderWindow()->Render();
+    }
 }
 
 //------------------------------------------------------------------------
@@ -111,7 +114,10 @@ void ViewShowNPoints::AddPoint()
 //------------------------------------------------------------------------
 void ViewShowNPoints::Render()
 {
-    renderer->GetRenderWindow()->Render();
+    if (renderer!=NULL) 
+    {
+        renderer->GetRenderWindow()->Render();
+    }
 }
 
 //------------------------------------------------------------------------
index 6ded36556bad12a53083a732a9b35bb2b686a7b3..40d7ec02adb4f719c6eb5252b32c99a8ec45df84 100644 (file)
@@ -1761,7 +1761,11 @@ void WidgetShowNPoints::RefreshColourCollection()
             lstViewShowNPoints[iCollection]->RefreshEachPoint();
         }// if mActualCollection
     } // for i
-    lstViewShowNPoints[mActualCollection] -> renderer->GetRenderWindow()->Render();
+
+    if (lstViewShowNPoints[mActualCollection]->renderer != NULL)
+    {
+        lstViewShowNPoints[mActualCollection]->renderer->GetRenderWindow()->Render();
+    } // if renderer
 }
 
 //------------------------------------------------------------------------