-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <Model_Data.h>
#include <ModelAPI_Feature.h>
#include <ModelAPI_Result.h>
#include <ModelAPI_ResultParameter.h>
+#include <ModelAPI_ResultConstruction.h>
#include <ModelAPI_Validator.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_ResultPart.h>
if (myWasChangedButBlocked.empty() || *(myWasChangedButBlocked.rbegin()) != theAttr)
myWasChangedButBlocked.push_back(theAttr);
}
+ } else {
+ // trim: need to redisplay or set color in the python script
+ if (myObject && (theAttr->attributeType() == "Point2D" || theAttr->id() == "Color")) {
+ static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY);
+ ModelAPI_EventCreator::get()->sendUpdated(myObject, anEvent);
+ }
}
}
// be displayed and previewed; also for avoiding of quick show/hide on history
// moving deep down
if (aRes && !theFeature->isDisabled()) {
- aRes->setIsConcealed(true);
+ aRes->setIsConcealed(true, theFeature->getKind() == "RemoveResults");
}
}
}
std::shared_ptr<ModelAPI_Result> aRes =
std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
if (aRes.get()) {
- aRes->setIsConcealed(true); // set concealed
- return;
+ if (aRes->groupName() != ModelAPI_ResultConstruction::group()) {
+ aRes->setIsConcealed(true); // set concealed
+ return;
+ } else if (aFeature->getKind() == "RemoveResults") {
+ aRes->setIsConcealed(true, true);
+ return;
+ }
}
}
}