- bool isModified = false;
- // the presentation should be recomputed if the previous AIS depend on the result
- // [it should be hiddend] or the new AIS depend on it [it should be visualized]
- Handle(PartSet_OperationPrs) anOperationPrs = getPresentation();
- Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
- if (!aContext.IsNull()) {
- if (aContext->IsDisplayed(anOperationPrs)) {
- // if there are performance poblems, to improve them, the necessity of redisplay can be checked
- //bool aChanged = anOperationPrs->dependOn(theObject);
- anOperationPrs->updateShapes();
- //aChanged = aChanged || anOperationPrs->dependOn(theObject);
- //if (aChanged)
- anOperationPrs->Redisplay();
- isModified = true;
- if (theUpdateViewer)
- workshop()->displayer()->updateViewer();
- }
- else {
- anOperationPrs->updateShapes();
- displayPresentation(theUpdateViewer);
- }
- }
- return isModified;