aViewPort->installEventFilter(aViewer);
Handle(V3d_View) aView = aViewPort->getView();
aViewer->SetScale(aView, aView->Camera()->Scale());
+ onViewManagerAdded(aMgr);
}
}
}
ResultPtr aRes = std::dynamic_pointer_cast<ModelAPI_Result>(aObj);
if (aRes.get() && (!aRes->shape().get() || aRes->shape()->isNull()))
continue;
- myDisplayer->display(aObj, false);
+ ResultBodyPtr aResBody = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aObj);
+ if (aResBody.get())
+ synchronizeResultTree(aResBody, false);
+ else
+ myDisplayer->display(aObj, false);
}
}
if (theUpdateViewer)
myDisplayer->updateViewer();
}
+
+void XGUI_Workshop::synchronizeResultTree(const ResultBodyPtr& theRes, bool theUpdateViewer)
+{
+ if (theRes->numberOfSubs() > 0)
+ for (int i = 0; i < theRes->numberOfSubs(); i++) {
+ ResultBodyPtr aRes = theRes->subResult(i);
+ if (aRes.get())
+ synchronizeResultTree(aRes, theUpdateViewer);
+ }
+ else
+ myDisplayer->display(theRes, theUpdateViewer);
+}
#endif
//******************************************************
#include <ModelAPI_Document.h>
#include <ModelAPI_Feature.h>
+#include <ModelAPI_ResultBody.h>
#include <ModuleBase_ActionInfo.h>
#include <ModuleBase_ActionType.h>
const std::string& theGroup,
bool theUpdateViewer);
+ void synchronizeResultTree(const ResultBodyPtr& theRes, bool theUpdateViewer);
+
#endif
/// Update the property panel content by the XML description of the operation and set the panel
/// into the operation