+//******************************************************
+void XGUI_Workshop::onFeatureRedisplayMsg(const Model_FeatureUpdatedMessage* theMsg)
+{
+ std::set<FeaturePtr> aFeatures = theMsg->features();
+ std::set<FeaturePtr>::const_iterator aIt;
+ bool isDisplayed = false;
+ for (aIt = aFeatures.begin(); aIt != aFeatures.end(); ++aIt) {
+ FeaturePtr aFeature = (*aIt);
+ if (aFeature->getKind() != PARTSET_PART_KIND) {
+ isDisplayed = myDisplayer->redisplay(aFeature, false);
+ }
+ }
+ if (isDisplayed)
+ myDisplayer->updateViewer();
+}
+
+//******************************************************
+void XGUI_Workshop::onFeatureCreatedMsg(const Model_FeatureUpdatedMessage* theMsg)
+{
+ std::set<FeaturePtr> aFeatures = theMsg->features();
+
+ std::set<FeaturePtr>::const_iterator aIt;
+ bool aHasPart = false;
+ bool isDisplayed = false;
+ for (aIt = aFeatures.begin(); aIt != aFeatures.end(); ++aIt) {
+ FeaturePtr aFeature = (*aIt);
+ if (aFeature->getKind() == PARTSET_PART_KIND) {
+ aHasPart = true;
+ //break;
+ } else {
+ isDisplayed = myDisplayer->display(aFeature, false);
+ }
+ }
+ if (isDisplayed)
+ myDisplayer->updateViewer();
+ if (aHasPart) {
+ //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()));
+ }
+}
+