X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FXGUI%2FXGUI_WorkshopListener.cpp;h=03aaf4fa1f10e729201c7bcaafa8a27d82a62145;hb=220bd2b37119be1c65abf88a88792445cb9d99f8;hp=e5c95c78bf7e68c333f712e5e051cf2ed7c341ee;hpb=8265a72ffc4629fde76928773cffbca1db07e2dd;p=modules%2Fshaper.git diff --git a/src/XGUI/XGUI_WorkshopListener.cpp b/src/XGUI/XGUI_WorkshopListener.cpp index e5c95c78b..03aaf4fa1 100755 --- a/src/XGUI/XGUI_WorkshopListener.cpp +++ b/src/XGUI/XGUI_WorkshopListener.cpp @@ -11,12 +11,14 @@ #include "XGUI_ModuleConnector.h" #include "XGUI_QtEvents.h" +#ifndef HAVE_SALOME #include #include #include #include #include #include +#endif #include @@ -27,6 +29,7 @@ #include #include #include +#include #include #include @@ -72,8 +75,6 @@ XGUI_WorkshopListener::XGUI_WorkshopListener(ModuleBase_IWorkshop* theWorkshop) myUpdatePrefs(false) { XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr(); - //connect(anOperationMgr, SIGNAL(nestedStateChanged(const std::string&, const bool)), - // this, SLOT(onNestedStateChanged(const std::string&, const bool))); } //****************************************************** @@ -194,7 +195,7 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr& } else if (theMessage->eventID() == Events_Loop::eventByName(EVENT_OBJECT_ERROR_CHANGED)) { std::shared_ptr aUpdMsg = std::dynamic_pointer_cast(theMessage); - std::set aObjects = aUpdMsg->objects(); + std::set anObjects = aUpdMsg->objects(); ModuleBase_OperationFeature* aFOperation = dynamic_cast (workshop()->operationMgr()->currentOperation()); @@ -203,7 +204,7 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr& FeaturePtr aFeature = aFOperation->feature(); if (aFeature.get()) { std::set::const_iterator aIt; - for (aIt = aObjects.begin(); aIt != aObjects.end() && !aFeatureChanged; ++aIt) { + for (aIt = anObjects.begin(); aIt != anObjects.end() && !aFeatureChanged; ++aIt) { aFeatureChanged = ModelAPI_Feature::feature(*aIt) == aFeature; } } @@ -218,12 +219,12 @@ void XGUI_WorkshopListener::processEvent(const std::shared_ptr& } return; } - if (!workshop()->isSalomeMode()) { +#ifndef HAVE_SALOME SessionPtr aMgr = ModelAPI_Session::get(); AppElements_MainWindow* aMainWindow = workshop()->mainWindow(); if (aMgr->isModified() != aMainWindow->isModifiedState()) aMainWindow->setModifiedState(aMgr->isModified()); - } +#endif } //****************************************************** @@ -231,14 +232,14 @@ void XGUI_WorkshopListener::onFeatureUpdatedMsg( const std::shared_ptr& theMsg) { #ifdef DEBUG_FEATURE_UPDATED - std::set aObjects = theMsg->objects(); + std::set anObjects = theMsg->objects(); std::set::const_iterator aIt; QStringList anInfo; - for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) { + for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) { anInfo.append(ModuleBase_Tools::objectInfo((*aIt))); } QString anInfoStr = anInfo.join(";\t"); - qDebug(QString("onFeatureUpdatedMsg: %1, %2").arg(aObjects.size()).arg(anInfoStr).toStdString().c_str()); + qDebug(QString("onFeatureUpdatedMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str()); #endif std::set aFeatures = theMsg->objects(); XGUI_OperationMgr* anOperationMgr = workshop()->operationMgr(); @@ -266,16 +267,16 @@ void XGUI_WorkshopListener::onFeatureUpdatedMsg( //****************************************************** void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr& theMsg) { - std::set aObjects = theMsg->objects(); + std::set anObjects = theMsg->objects(); std::set::const_iterator aIt; #ifdef DEBUG_FEATURE_REDISPLAY QStringList anInfo; - for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) { + for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) { anInfo.append(ModuleBase_Tools::objectInfo((*aIt))); } QString anInfoStr = anInfo.join(";\t"); - qDebug(QString("onFeatureRedisplayMsg: %1, %2").arg(aObjects.size()).arg(anInfoStr).toStdString().c_str()); + qDebug(QString("onFeatureRedisplayMsg: %1, %2").arg(anObjects.size()).arg(anInfoStr).toStdString().c_str()); #endif XGUI_Workshop* aWorkshop = workshop(); @@ -283,7 +284,8 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr aHiddenObjects; + for (aIt = anObjects.begin(); aIt != anObjects.end(); ++aIt) { ObjectPtr aObj = (*aIt); // Hide the object if it is invalid or concealed one @@ -292,7 +294,13 @@ void XGUI_WorkshopListener::onFeatureRedisplayMsg(const std::shared_ptr