mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-13 10:10:34 +05:00
code refactoring
This commit is contained in:
parent
931cb7d1ae
commit
aa37ece780
@ -642,19 +642,6 @@ void EntityGUI_3DSketcherDlg::ActivateThisDialog()
|
||||
void EntityGUI_3DSketcherDlg::ValueChangedInSpinBox( double newValue )
|
||||
{
|
||||
GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
|
||||
|
||||
if(GroupType->RadioButton3->isChecked())
|
||||
{
|
||||
double anAngle2 = 0.0;
|
||||
if (GroupAngles->checkBox->isChecked())
|
||||
anAngle2 = GroupAngles->SpinBox_DA2->value();
|
||||
|
||||
displayAngle(GroupAngles->SpinBox_DA->value(), anAngle2, GroupAngles->SpinBox_DL->value(), myOrientation);
|
||||
displayLength(GroupAngles->SpinBox_DL->value());
|
||||
}
|
||||
if( GroupType->RadioButton1->isChecked() ||
|
||||
GroupType->RadioButton2->isChecked() )
|
||||
displayLength();
|
||||
}
|
||||
|
||||
|
||||
@ -691,8 +678,8 @@ void EntityGUI_3DSketcherDlg::BoxChecked( bool checked )
|
||||
else
|
||||
isAngleVisible=false;
|
||||
}
|
||||
// updateViewer();
|
||||
ValueChangedInSpinBox(0.0); // To redisplay the previews
|
||||
|
||||
GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -701,7 +688,6 @@ void EntityGUI_3DSketcherDlg::BoxChecked( bool checked )
|
||||
//=================================================================================
|
||||
void EntityGUI_3DSketcherDlg::ButtonClicked( bool checked )
|
||||
{
|
||||
GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
|
||||
if (GroupAngles->radioButton_1->isChecked())
|
||||
myOrientation = 1;
|
||||
else if (GroupAngles->radioButton_2->isChecked())
|
||||
@ -709,15 +695,7 @@ void EntityGUI_3DSketcherDlg::ButtonClicked( bool checked )
|
||||
else
|
||||
myOrientation = 3;
|
||||
|
||||
if(GroupAngles->SpinBox_DL->value()>Precision::Confusion())
|
||||
{
|
||||
double anAngle2 = 0.0;
|
||||
if (GroupAngles->checkBox->isChecked())
|
||||
anAngle2 = GroupAngles->SpinBox_DA2->value();
|
||||
|
||||
displayAngle(GroupAngles->SpinBox_DA->value(), anAngle2, GroupAngles->SpinBox_DL->value(), myOrientation);
|
||||
displayLength(GroupAngles->SpinBox_DL->value());
|
||||
}
|
||||
GEOMBase_Helper::displayPreview( true, false, true, true, myLineWidth );
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
@ -985,6 +963,19 @@ void EntityGUI_3DSketcherDlg::displayPreview( GEOM::GEOM_Object_ptr object,
|
||||
if (myMode == 1 || myMode == 2)
|
||||
displayTrihedron(2);
|
||||
|
||||
// Display preview of suitable dimension presentations
|
||||
if(myMode == 2) // ANGLES
|
||||
{
|
||||
double anAngle2 = 0.0;
|
||||
if (GroupAngles->checkBox->isChecked())
|
||||
anAngle2 = GroupAngles->SpinBox_DA2->value();
|
||||
|
||||
displayAngle(GroupAngles->SpinBox_DA->value(), anAngle2, GroupAngles->SpinBox_DL->value(), myOrientation);
|
||||
displayLength(GroupAngles->SpinBox_DL->value());
|
||||
}
|
||||
if( myMode == 0 || myMode == 1 ) // COORDINATES
|
||||
displayLength();
|
||||
|
||||
getDisplayer()->UnsetName();
|
||||
|
||||
// Enable activation of displayed objects
|
||||
|
Loading…
Reference in New Issue
Block a user