+ std::shared_ptr<ModelAPI_AttributeReference> aRefPreviewAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeReference>(
+ feature()->data()->attribute(myPreviewObjectAttribute));
+ ObjectPtr aPreviewObject = aRefPreviewAttr->value();
+ // do not move focus from the current widget if the object is not highlighted/selected
+ if (!aPreviewObject.get())
+ return;
+
+ // set parameters of preview into parameters of selection in the feature
+ std::shared_ptr<ModelAPI_AttributeReference> aRefSelectedAttr =
+ std::dynamic_pointer_cast<ModelAPI_AttributeReference>(
+ feature()->data()->attribute(mySelectedObjectAttribute));
+ aRefSelectedAttr->setValue(aRefPreviewAttr->value());
+
+ std::shared_ptr<GeomDataAPI_Point2D> aPointSelectedAttr =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+ feature()->data()->attribute(mySelectedPointAttribute));
+ std::shared_ptr<GeomDataAPI_Point2D> aPointPreviewAttr =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(
+ feature()->data()->attribute(myPreviewPointAttribute));
+ aPointSelectedAttr->setValue(aPointPreviewAttr->x(), aPointPreviewAttr->y());
+
+ updateObject(feature());
+