ViewManagerList OCCViewManagers;
application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
if (OCCViewManagers.size() > 0) {
- mySelector = createSelector(OCCViewManagers.first());
+ onViewManagerAdded(OCCViewManagers.first());
}
}
// it should be performed after the selector creation in order to have AISContext
if (aRes.get())
synchronizeResultTree(aRes, theUpdateViewer);
}
- else
- myDisplayer->display(theRes, theUpdateViewer);
+ else {
+ if (theRes->isDisplayed())
+ myDisplayer->display(theRes, theUpdateViewer);
+ else
+ myDisplayer->erase(theRes, theUpdateViewer);
+ }
}
#endif