///! On abort, undo or redo it is not necessary: results in document are updated automatically
bool executeFeatures() {return myExecuteFeatures;}
+ ///! Reutrns true is result was conecaled because of usage it by other object
+ virtual bool isConcealed(const boost::shared_ptr<ModelAPI_Object>& theResult) {
+ return myConcealedResults.find(boost::dynamic_pointer_cast<ModelAPI_Result>(theResult))
+ != myConcealedResults.end();
+ }
+
protected:
//! Returns (creates if needed) the features label
virtual boost::shared_ptr<ModelAPI_Feature> feature(
const boost::shared_ptr<ModelAPI_Result>& theResult) = 0;
- protected:
+ ///! Reutrns true is result was conecaled because of usage it by other object
+ virtual bool isConcealed(const boost::shared_ptr<ModelAPI_Object>& theResult) = 0;
+
+protected:
/// Only for SWIG wrapping it is here
MODELAPI_EXPORT ModelAPI_Document()
{
std::set<ObjectPtr>::const_iterator aIt;
for (aIt = aObjects.begin(); aIt != aObjects.end(); ++aIt) {
ObjectPtr aObj = (*aIt);
- if (!aObj->data() || !aObj->data()->isValid())
+ if (!aObj->data() || !aObj->data()->isValid() || aObj->document()->isConcealed(aObj))
myDisplayer->erase(aObj, false);
else {
if (myDisplayer->isVisible(aObj)) // TODO VSV: Correction sketch drawing
// it doesn't stored in the operation mgr and doesn't displayed
} else if (myOperationMgr->hasOperation()) {
ModuleBase_Operation* aOperation = myOperationMgr->currentOperation();
- if (aOperation->hasObject(*aIt)) { // Display only current operation results
+ if (!(*aIt)->document()->isConcealed(*aIt) &&
+ aOperation->hasObject(*aIt)) { // Display only current operation results
myDisplayer->display(*aIt, false);
isDisplayed = true;
}