From: apo Date: Fri, 23 Nov 2007 07:50:47 +0000 (+0000) Subject: Fix for Bug IPAL17688 X-Git-Tag: mergefrom_MERGE_MULTIPR_EVOLUTION_07-Dec-07~29 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1ccf2cf96dce2a630ef104930061fc3451b9d744;p=modules%2Fvisu.git Fix for Bug IPAL17688 TC71: REGR: Preferences - ?Generate data table? works wrong --- diff --git a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx index fca17c18..554ba78d 100644 --- a/src/VISUGUI/VisuGUI_CutLinesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutLinesDlg.cxx @@ -306,8 +306,8 @@ void VisuGUI_CutLinesDlg::initFromPrsObject ( VISU::ColoredPrs3d_i* thePrs, hasInit = true; myCutLines = VISU::TSameAsFactory().Create(myPrsCopy, VISU::ColoredPrs3d_i::EDoNotPublish); myCutLines->CopyCurvesInverted(myPrsCopy->GetCurvesInverted()); - if (myCutLines->IsAllCurvesInverted()) - myAllCurvesInvertedCheck->setChecked(true); + myAllCurvesInvertedCheck->setChecked( myCutLines->IsAllCurvesInverted() ); + myUseAbsoluteLengthCheck->setChecked( myCutLines->IsUseAbsoluteLength() ); myBasePlanePos->setText( QString::number(myCutLines->GetBasePlanePosition()) ); myCBSetDef->setChecked(myPrsCopy->IsDefault()); DrawTable(); @@ -351,10 +351,12 @@ int VisuGUI_CutLinesDlg::storeToPrsObject (VISU::ColoredPrs3d_i* thePrs) for (int i = 0; i < (int)myNbSpn->value(); ++i) { if (!((QCheckTableItem*)myPosTable->item( i, 1 ))->isChecked()) myPrsCopy->SetLinePosition( i, myPosTable->text( i, 0 ).toDouble() ); - else myPrsCopy->SetDefaultPosition(i); + else + myPrsCopy->SetDefaultPosition(i); } - if (myAllCurvesInvertedCheck->isChecked()) - myPrsCopy->SetAllCurvesInverted(true); + + myPrsCopy->SetAllCurvesInverted( myAllCurvesInvertedCheck->isChecked() ); + myPrsCopy->SetUseAbsoluteLength( myUseAbsoluteLengthCheck->isChecked() ); VISU::TSameAsFactory().Copy(myPrsCopy, thePrs); @@ -757,14 +759,11 @@ void VisuGUI_CutLinesDlg::onPreviewCheck (bool thePreview) */ void VisuGUI_CutLinesDlg::onAllCurvesInvertedCheck(bool theInvert) { - if (myAllCurvesInvertedCheck->isChecked()){ - myCutLines->SetAllCurvesInverted(true); - myPrsCopy->SetAllCurvesInverted(true); - } - else { - myCutLines->SetAllCurvesInverted(false); - myPrsCopy->SetAllCurvesInverted(false); - } + bool anIsAllCurvesInverted = myAllCurvesInvertedCheck->isChecked(); + + myCutLines->SetAllCurvesInverted( anIsAllCurvesInverted ); + myPrsCopy->SetAllCurvesInverted( anIsAllCurvesInverted ); + updateGlyphs(true); }