From: vsv Date: Thu, 30 Apr 2015 10:02:27 +0000 (+0300) Subject: Merge branch 'Dev_1.2.0' of newgeom:newgeom into Dev_1.2.0 X-Git-Tag: V_1.2.0~177^2~1^2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ed67f7abf2985c7225b7862c076257825a421993;p=modules%2Fshaper.git Merge branch 'Dev_1.2.0' of newgeom:newgeom into Dev_1.2.0 Conflicts: src/ModuleBase/ModuleBase_IModule.h src/PartSet/PartSet_Module.cpp --- ed67f7abf2985c7225b7862c076257825a421993 diff --cc src/ModuleBase/ModuleBase_IModule.h index 0e9b1feb0,65a5c5a5a..ef8daaecd --- a/src/ModuleBase/ModuleBase_IModule.h +++ b/src/ModuleBase/ModuleBase_IModule.h @@@ -121,9 -120,10 +121,13 @@@ class MODULEBASE_EXPORT ModuleBase_IMod /// \returns true if the action is processed virtual bool deleteObjects() { return false; }; + /// Returns data model object for representation of data tree in Object browser + virtual ModuleBase_IDocumentDataModel* dataModel() const = 0; + + /// Returns a list of modes, where the AIS objects should be activated + /// \param theModes a list of modes + virtual void activeSelectionModes(QIntList& theModes) {}; + public slots: /// Called on call of command corresponded to a feature void onFeatureTriggered(); diff --cc src/PartSet/PartSet_Module.cpp index 9077aaaff,662e3d1bc..e32bba643 --- a/src/PartSet/PartSet_Module.cpp +++ b/src/PartSet/PartSet_Module.cpp @@@ -22,10 -18,7 +22,9 @@@ #include #include #include +#include + #include + - #include - #include #include #include @@@ -297,11 -280,18 +294,18 @@@ bool PartSet_Module::canDisplayObject(c } -bool PartSet_Module::addViewerItems(QMenu* theMenu, const QMap& theStdActions) const +bool PartSet_Module::addViewerMenu(QMenu* theMenu, const QMap& theStdActions) const { - return myMenuMgr->addViewerItems(theMenu, theStdActions); + return myMenuMgr->addViewerMenu(theMenu, theStdActions); } + void PartSet_Module::activeSelectionModes(QIntList& theModes) + { + theModes.clear(); + if (mySketchMgr->activeSketch().get()) + PartSet_SketcherMgr::sketchSelectionModes(theModes); + } + bool PartSet_Module::isMouseOverWindow() { return mySketchMgr->isMouseOverWindow(); diff --cc src/PartSet/PartSet_Module.h index fc41521cd,9ba109a65..6da7807b2 --- a/src/PartSet/PartSet_Module.h +++ b/src/PartSet/PartSet_Module.h @@@ -109,8 -101,12 +109,12 @@@ public /// \param theMenu a popup menu to be shown in the viewer /// \param theStdActions a map of standard actions /// \return true if items are added and there is no necessity to provide standard menu - virtual bool addViewerItems(QMenu* theMenu, const QMap& theStdActions) const; + virtual bool addViewerMenu(QMenu* theMenu, const QMap& theStdActions) const; + /// Returns a list of modes, where the AIS objects should be activated + /// \param theModes a list of modes + virtual void activeSelectionModes(QIntList& theModes); + /// Returns whether the mouse enter the viewer's window /// \return true if items are added and there is no necessity to provide standard menu bool isMouseOverWindow();