From b814085c4bce27405a1455a6f8c6ca2714a55e4f Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 19 Aug 2008 09:16:35 +0000 Subject: [PATCH] Bug IPAL20185 Fatal error in 4x, hang up in 5x on edit deformed shape if plot2d view is active --- src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index 6e677fc8..6cc67340 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -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(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; } -- 2.39.2