]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
authorsbh <sergey.belash@opencascade.com>
Thu, 22 May 2014 09:46:23 +0000 (13:46 +0400)
committersbh <sergey.belash@opencascade.com>
Thu, 22 May 2014 09:46:23 +0000 (13:46 +0400)
Conflicts:
src/XGUI/XGUI_Workshop.h

1  2 
src/Config/Config_ModuleReader.cpp
src/XGUI/XGUI_Workshop.cpp
src/XGUI/XGUI_Workshop.h

Simple merge
index cb7a3c790f8dc44558b5cab53359f64736428bbb,65450b189a2bc6bb7968684516f3ddc3ac732f41..9d064f210bbe9500ad01613bbf22880196a9efcd
@@@ -200,11 -204,27 +204,29 @@@ void XGUI_Workshop::processEvent(const 
    static Events_ID aFeatureLoadedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_LOADED);
    if (theMessage->eventID() == aFeatureLoadedId) {
      const Config_FeatureMessage* aFeatureMsg = dynamic_cast<const Config_FeatureMessage*>(theMessage);
 -    addFeature(aFeatureMsg);
 +    if(!aFeatureMsg->isInternal()) {
 +      addFeature(aFeatureMsg);
 +    }
      return;
    }
+   // Process creation of Part
+   if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_CREATED)) {
+     const Model_FeatureUpdatedMessage* aUpdMsg = dynamic_cast<const Model_FeatureUpdatedMessage*>(theMessage);
+     FeaturePtr aFeature = aUpdMsg->feature();
+     if (aFeature->getKind() == "Part") {
+       //The created part will be created in Object Browser later and we have to activate it
+       // only when it is created everywere
+       QTimer::singleShot(50, this, SLOT(activateLastPart()));
+     }
+   }
+   // Process deletion of a part
+   if (theMessage->eventID() == Events_Loop::loop()->eventByName(EVENT_FEATURE_DELETED)) {
+     PluginManagerPtr aMgr = ModelAPI_PluginManager::get();
+     if (aMgr->currentDocument() == aMgr->rootDocument())
+       activatePart(FeaturePtr()); // Activate PartSet
+   }
    //Update property panel on corresponding message. If there is no current operation (no
    //property panel), or received message has different feature to the current - do nothing.
    static Events_ID aFeatureUpdatedId = Events_Loop::loop()->eventByName(EVENT_FEATURE_UPDATED);
index 306e6d644b57d3e54cd3778312940e13b5ad445e,21ee4a87b6cd86f755b56630bcc2a7c42b231648..8ffb703b82a02815e36e2deeae0e7f1a46cecec6
@@@ -153,10 -158,7 +158,6 @@@ private
    // Creates Dock widgets: Object browser and Property panel
    void createDockWidgets();
  
-   //! Activates or deactivates currently selected part
-   void activatePart(bool toActivate);
-   QString myCurrentDir;
 -  QString myCurrentFile;
    XGUI_MainWindow* myMainWindow;
    XGUI_Module* myPartSetModule;
    XGUI_ObjectsBrowser* myObjectBrowser;
    XGUI_ViewerProxy* myViewerProxy;
    XGUI_ContextMenuMgr* myContextMenuMgr;
  
++  QString myCurrentDir;
    static QMap<QString, QString> myIcons;
  
  };