From 29422b8de2581c91918e06bebad0f9bf90f55ba9 Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 26 Aug 2008 07:36:55 +0000 Subject: [PATCH] Bug IPAL20206 Qt4 porting: vectors are not displayed in 3D and hangup on edit --- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 3 ++- src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx | 3 ++- src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx | 5 ++--- src/VISUGUI/VisuGUI_VectorsDlg.cxx | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 1da83624..ce7b667a 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -194,7 +194,8 @@ VisuGUI_CutPlanesPane::VisuGUI_CutPlanesPane (QWidget* theParent) SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 ); - myScaleSpn->setDecimals( aPrecision*(-1) ); + myScaleSpn->setPrecision( aPrecision*(-1) ); + myScaleSpn->setDecimals(38); myScaleSpn->setValue(0.1); myPreviewCheck = new QCheckBox(tr("LBL_SHOW_PREVIEW"), this); diff --git a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx index 67c3871d..e3d180b9 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeAndScalarMapDlg.cxx @@ -103,7 +103,8 @@ VisuGUI_DeformedShapeAndScalarMapDlg::VisuGUI_DeformedShapeAndScalarMapDlg (Salo SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 ); - ScalFact->setDecimals( aPrecision*(-1) ); + ScalFact->setPrecision( aPrecision*(-1) ); + ScalFact->setDecimals( 32 ); ScalFact->setValue(0.1); TopGroupLayout->addWidget(ScalFact, 0, 1); diff --git a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx index 6cc67340..6f6aa2b4 100644 --- a/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx +++ b/src/VISUGUI/VisuGUI_DeformedShapeDlg.cxx @@ -95,8 +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 ); // ScalFact->setDecimals(38); - // ScalFact->setFormat ( false ); // generic format + ScalFact->setPrecision( aPrecision*(-1) ); + ScalFact->setDecimals(38); ScalFact->setValue(0.1); TopGroupLayout->addWidget(ScalFact, 0, 1); @@ -163,7 +163,6 @@ void VisuGUI_DeformedShapeDlg::initFromPrsObject (VISU::ColoredPrs3d_i* thePrs, myPrsCopy = VISU::TSameAsFactory().Create(thePrs, VISU::ColoredPrs3d_i::EDoNotPublish); VisuGUI_ScalarBarBaseDlg::initFromPrsObject(myPrsCopy, theInit); - setFactor(myPrsCopy->GetScale()); UseMagn->setChecked(myPrsCopy->IsColored()); diff --git a/src/VISUGUI/VisuGUI_VectorsDlg.cxx b/src/VISUGUI/VisuGUI_VectorsDlg.cxx index ed7bcc57..1f624abb 100644 --- a/src/VISUGUI/VisuGUI_VectorsDlg.cxx +++ b/src/VISUGUI/VisuGUI_VectorsDlg.cxx @@ -95,7 +95,8 @@ VisuGUI_VectorsDlg::VisuGUI_VectorsDlg (SalomeApp_Module* theModule) SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr(); int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 ); - ScalFact->setDecimals( aPrecision*(-1) ); // ScalFact->setDecimals( 5 ); + ScalFact->setPrecision( aPrecision*(-1) ); + ScalFact->setDecimals( 32 ); ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) ); ScalFact->setValue( 0.1 ); -- 2.39.2