1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetShapeSelector.cpp
4 // Created: 27 Nov 2014
5 // Author: Vitaly Smetannikov
7 #include "PartSet_WidgetEditor.h"
8 #include "PartSet_Module.h"
10 #include <ModuleBase_IWorkshop.h>
12 #include <Config_WidgetAPI.h>
16 PartSet_WidgetEditor::PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
17 const Config_WidgetAPI* theData)
18 : ModuleBase_WidgetEditor(theParent, theData), myWorkshop(theWorkshop)
22 bool PartSet_WidgetEditor::focusTo()
24 PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
25 if (aModule->isMouseOverWindow() && !isEditingMode())
26 return ModuleBase_WidgetEditor::focusTo();
28 return ModuleBase_WidgetDoubleValue::focusTo();