X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FPrimitiveGUI%2FPrimitiveGUI_CylinderDlg.cxx;h=a7d0f0ab928af5f3957b619875e3431ca0b7e06b;hb=63e04ef7a7d83e52fc010bf95f88a9ce1d8aeebc;hp=66333aa2466c12b9064fe82ffea0c274c04502a6;hpb=6f000dfe28cad33bcf7053913e1a2f24b3fa3e33;p=modules%2Fgeom.git diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 66333aa24..a7d0f0ab9 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -317,7 +317,7 @@ void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument() GroupPoints->LineEdit2->setEnabled(false); globalSelection(GEOM_POINT); // to break previous local selection - localSelection(GEOM::GEOM_Object::_nil(), TopAbs_VERTEX); + localSelection(TopAbs_VERTEX); } else if (send == GroupPoints->PushButton2) { myEditCurrentArgument = GroupPoints->LineEdit2; @@ -326,7 +326,7 @@ void PrimitiveGUI_CylinderDlg::SetEditCurrentArgument() GroupPoints->LineEdit1->setEnabled(false); globalSelection(GEOM_LINE); // to break previous local selection - localSelection(GEOM::GEOM_Object::_nil(), TopAbs_EDGE); + localSelection(TopAbs_EDGE); } connect(myGeomGUI->getApp()->selectionMgr(), SIGNAL(currentSelectionChanged()), this, SLOT(SelectionIntoArgument())); @@ -385,7 +385,7 @@ void PrimitiveGUI_CylinderDlg::ValueChangedInSpinBox() //================================================================================= GEOM::GEOM_IOperations_ptr PrimitiveGUI_CylinderDlg::createOperation() { - return getGeomEngine()->GetI3DPrimOperations(getStudyId()); + return getGeomEngine()->GetI3DPrimOperations(); } //================================================================================= @@ -411,7 +411,7 @@ bool PrimitiveGUI_CylinderDlg::isValid (QString& msg) { ok = GroupDimensions->SpinBox_DX->isValid( msg, !IsPreview() ) && GroupDimensions->SpinBox_DY->isValid( msg, !IsPreview() ) && - ( GroupDimensions->checkBox->isChecked() || GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) ); + ( !GroupDimensions->checkBox->isChecked() || GroupDimensions->SpinBox_DZ->isValid( msg, !IsPreview() ) ); if ( GroupDimensions->checkBox->isChecked() && ( GroupDimensions->SpinBox_DZ->value() <= 0. || GroupDimensions->SpinBox_DZ->value() >= 360. ) ) { msg += tr("GEOM_CYLINDER_ANGLE_ERR") + "\n"; @@ -446,7 +446,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); aParameters << GroupPoints->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -457,7 +457,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupPoints->SpinBox_DX->text(); aParameters << GroupPoints->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -472,7 +472,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); aParameters << GroupDimensions->SpinBox_DZ->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -483,7 +483,7 @@ bool PrimitiveGUI_CylinderDlg::execute (ObjectList& objects) QStringList aParameters; aParameters << GroupDimensions->SpinBox_DX->text(); aParameters << GroupDimensions->SpinBox_DY->text(); - anObj->SetParameters(aParameters.join(":").toLatin1().constData()); + anObj->SetParameters(aParameters.join(":").toUtf8().constData()); } res = true; } @@ -550,6 +550,17 @@ void PrimitiveGUI_CylinderDlg::addSubshapesToStudy() } } +//================================================================================= +// function : getSourceObjects +// purpose : virtual method to get source objects +//================================================================================= +QList PrimitiveGUI_CylinderDlg::getSourceObjects() +{ + QList res; + res << myPoint << myDir; + return res; +} + //================================================================================= // function : ActivateAngle() // purpose : enable the