X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_WidgetPoint2d.cpp;h=d2c65a27f018a24c843d8e9a7c1fcc4d4b6f0b0f;hb=c55b14977783111c8b418b416c7f6c2fa545c5e5;hp=4104331df0114782194ca1c48b9e04ee0eed99d7;hpb=0c0573f4321deb94f9c5d3182a34fb672cc6e1f0;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 4104331df..d2c65a27f 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include @@ -70,7 +70,7 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, aLabel->setPixmap(QPixmap(":pictures/x_point.png")); aGroupLay->addWidget(aLabel, 0, 0); - myXSpin = new ModuleBase_DoubleSpinBox(myGroupBox); + myXSpin = new ModuleBase_ParamSpinBox(myGroupBox); myXSpin->setMinimum(-DBL_MAX); myXSpin->setMaximum(DBL_MAX); myXSpin->setToolTip(tr("X")); @@ -84,7 +84,7 @@ PartSet_WidgetPoint2D::PartSet_WidgetPoint2D(QWidget* theParent, aLabel->setPixmap(QPixmap(":pictures/y_point.png")); aGroupLay->addWidget(aLabel, 1, 0); - myYSpin = new ModuleBase_DoubleSpinBox(myGroupBox); + myYSpin = new ModuleBase_ParamSpinBox(myGroupBox); myYSpin->setMinimum(-DBL_MAX); myYSpin->setMaximum(DBL_MAX); myYSpin->setToolTip(tr("Y")); @@ -262,8 +262,11 @@ void PartSet_WidgetPoint2D::onMouseRelease(ModuleBase_IViewWindow* theWnd, QMous if (aSelectedFeature.get() != NULL) { std::shared_ptr aSPFeature = std::dynamic_pointer_cast(aSelectedFeature); - if ((!aSPFeature) && (!aShape.IsNull())) - PartSet_Tools::createFixedObjectByExternal(aShape, aObject, mySketch); + if ((!aSPFeature) && (!aShape.IsNull())) { + ResultPtr aFixedObject = PartSet_Tools::findFixedObjectByExternal(aShape, aObject, mySketch); + if (!aFixedObject.get()) + aFixedObject = PartSet_Tools::createFixedObjectByExternal(aShape, aObject, mySketch); + } } double aX, aY; if (getPoint2d(aView, aShape, aX, aY)) {