]> SALOME platform Git repositories - modules/shaper.git/blob - src/PartSet/PartSet_WidgetEditor.cpp
Salome HOME
#1371 Using auxilliary Sketch elements in any Feature: code improvement to separate...
[modules/shaper.git] / src / PartSet / PartSet_WidgetEditor.cpp
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetShapeSelector.cpp
4 // Created:     27 Nov 2014
5 // Author:      Vitaly Smetannikov
6
7 #include "PartSet_WidgetEditor.h"
8 #include "PartSet_Module.h"
9
10 #include <ModuleBase_IWorkshop.h>
11
12 #include <Config_WidgetAPI.h>
13
14 #include <QWidget>
15
16 PartSet_WidgetEditor::PartSet_WidgetEditor(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
17                                            const Config_WidgetAPI* theData)
18  : ModuleBase_WidgetEditor(theParent, theData), myWorkshop(theWorkshop)
19 {
20 }
21
22 bool PartSet_WidgetEditor::focusTo()
23 {
24   PartSet_Module* aModule = dynamic_cast<PartSet_Module*>(myWorkshop->module());
25   if (aModule->isMouseOverWindow() && !isEditingMode())
26     return ModuleBase_WidgetEditor::focusTo();
27   else {
28     return ModuleBase_WidgetDoubleValue::focusTo();
29   }
30 }