]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view...
authordmv <dmv@opencascade.com>
Tue, 19 Aug 2008 09:16:35 +0000 (09:16 +0000)
committerdmv <dmv@opencascade.com>
Tue, 19 Aug 2008 09:16:35 +0000 (09:16 +0000)
src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx

index 6e677fc8c7692339f9a9f385a7beebb3d886f207..6cc673400a8605377ef5ca43ca767edca8efcab8 100644 (file)
@@ -95,7 +95,8 @@ VisuGUI_DeformedShapeDlg::VisuGUI_DeformedShapeDlg (SalomeApp_Module* theModule)
   SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
   int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
 
-  ScalFact->setDecimals( aPrecision*(-1) ); // ScalFact->setDecimals(38);
+  ScalFact->setDecimals( aPrecision ); // ScalFact->setDecimals(38);
+  //  ScalFact->setFormat ( false ); // generic format
   ScalFact->setValue(0.1);
   TopGroupLayout->addWidget(ScalFact, 0, 1);
 
@@ -331,9 +332,10 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP
 
     //Hide thePrs3d from Viewer
     SVTK_ViewWindow* aViewWindow = VISU::GetActiveViewWindow<SVTK_ViewWindow>(theModule);
-    if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
-      if (anActor->GetVisibility())
-       anActor->VisibilityOff();
+    if (aViewWindow)
+      if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
+       if (anActor->GetVisibility())
+         anActor->VisibilityOff();
 
     VisuGUI_DialogRunner r(aDlg);
     int dlgResult = r.run( false );
@@ -353,9 +355,10 @@ void VisuGUI_DeformedShapeDlg::EditPrs3d(VisuGUI* theModule, VISU::Prs3d_i* theP
         QObject::tr("ERR_CANT_BUILD_PRESENTATION") + ": " + QObject::tr(exc.what()));
     }
 
-    if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
-      if (!anActor->GetVisibility())
-       anActor->VisibilityOn();
+    if (aViewWindow)
+      if (VISU_Actor* anActor = FindActor(aViewWindow, thePrs3d))
+       if (!anActor->GetVisibility())
+         anActor->VisibilityOn();
     
     delete aDlg;    
   }