From 1ccf2cf96dce2a630ef104930061fc3451b9d744 Mon Sep 17 00:00:00 2001 From: apo Date: Fri, 23 Nov 2007 07:50:47 +0000 Subject: [PATCH] Fix for Bug IPAL17688 TC71: REGR: Preferences - ?Generate data table? works wrong --- src/VISUGUI/VisuGUI_CutLinesDlg.cxx | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) 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); } -- 2.39.2