Salome HOME
Feature selector widget for recover feature.
[modules/shaper.git] / src / PartSet / PartSet_WidgetEditor.cpp
index 66ed150b86e2c2947c633598f781bd79c0a97e1e..54e455ceb226e472de415d7b9664443854e1feef 100644 (file)
 #include <QWidget>
 
 PartSet_WidgetEditor::PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
-                                           const Config_WidgetAPI* theData,
-                                           const std::string& theParentId)
- : ModuleBase_WidgetEditor(theParent, theData, theParentId), myWorkshop(theWorkshop)
+                                           const Config_WidgetAPI* theData)
+ : ModuleBase_WidgetEditor(theParent, theData), myWorkshop(theWorkshop)
 {
 }
 
 bool PartSet_WidgetEditor::focusTo()
 {
   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
-  if (aModule->isMouseOverWindow())
-    return ModuleBase_WidgetDoubleValue::focusTo();
+  if (aModule->isMouseOverWindow() && !isEditingMode())
+    return ModuleBase_WidgetEditor::focusTo();
   else {
-    ModuleBase_WidgetEditor::focusTo();
+    return ModuleBase_WidgetDoubleValue::focusTo();
   }
 }