//********************************************************************
bool ModuleBase_WidgetPointInput
-::setSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs)
+::setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
+ const bool theToValidate)
{
- GeomShapePtr aShape = thePrs->shape();
- if (aShape->isVertex()) {
- GeomVertexPtr aVertex(new GeomAPI_Vertex(aShape));
- GeomPointPtr aPnt = aVertex->point();
- myXSpin->setValue(aPnt->x());
- myYSpin->setValue(aPnt->y());
- myZSpin->setValue(aPnt->z());
- return true;
+ if (theValues.size() == 1) {
+ GeomShapePtr aShape = theValues.first()->shape();
+ if (aShape->isVertex()) {
+ GeomVertexPtr aVertex(new GeomAPI_Vertex(aShape));
+ GeomPointPtr aPnt = aVertex->point();
+ myXSpin->setValue(aPnt->x());
+ myYSpin->setValue(aPnt->y());
+ myZSpin->setValue(aPnt->z());
+ return true;
+ }
}
return false;
}
/// Fills the attribute with the value of the selected owner
/// \param thePrs a selected owner
- virtual bool setSelectionCustom(const std::shared_ptr<ModuleBase_ViewerPrs>& thePrs);
+ virtual bool setSelection(QList<std::shared_ptr<ModuleBase_ViewerPrs>>& theValues,
+ const bool theToValidate);
protected:
/// Retunrs a list of possible shape types