+
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::eventFilter(QObject* theObj, QEvent* theEvent)
+{
+ if (theObj == myTextLine) {
+ if (theEvent->type() == QEvent::FocusIn)
+ activateSelection(true);
+ }
+ return ModuleBase_ModelWidget::eventFilter(theObj, theEvent);
+}
+
+//********************************************************************
+bool ModuleBase_WidgetShapeSelector::setValue(ModuleBase_WidgetValue* theValue)
+{
+ if (theValue) {
+ ModuleBase_WidgetValueFeature* aFeatureValue =
+ dynamic_cast<ModuleBase_WidgetValueFeature*>(theValue);
+ if (aFeatureValue && aFeatureValue->object()) {
+ ObjectPtr aObject = aFeatureValue->object();
+ if (acceptObjectShape(aObject)) {
+ setObject(aObject);
+ return true;
+ }
+ }
+ }
+ return false;
+}
+