#include <XGUI_Selection.h>
#include <XGUI_OperationMgr.h>
-#include <ModuleBase_DoubleSpinBox.h>
+#include <ModuleBase_ParamSpinBox.h>
#include <ModuleBase_Tools.h>
#include <ModuleBase_IViewWindow.h>
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"));
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"));
// locking of the validating state.
ModuleBase_Tools::setSpinValue(myXSpin, isOk ? aDefValue : 0.0);
ModuleBase_Tools::setSpinValue(myYSpin, isOk ? aDefValue : 0.0);
+ storeValueCustom();
}
}
if (aSelectedFeature.get() != NULL) {
std::shared_ptr<SketchPlugin_Feature> aSPFeature =
std::dynamic_pointer_cast<SketchPlugin_Feature>(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)) {