if (!anAISIO.IsNull()) {
appendResultObject(theObject, theAIS);
- bool aCanBeShaded = ::canBeShaded(anAISIO);
- // In order to avoid extra closing/opening context
- SelectMgr_IndexedMapOfOwner aSelectedOwners;
- if (aCanBeShaded) {
- myWorkshop->selector()->selection()->selectedOwners(aSelectedOwners);
- closeLocalContexts(false);
- }
- aContext->Display(anAISIO, false);
- aContext->SetDisplayMode(anAISIO, isShading? Shading : Wireframe, false);
+ bool isCustomized = customizeObject(theObject);
+
- aContext->Display(anAISIO, isShading? Shading : Wireframe, 0, false, true, AIS_DS_Displayed);
++ int aDispMode = isShading? Shading : Wireframe;
if (isShading)
anAISIO->Attributes()->SetFaceBoundaryDraw( Standard_True );
-- emit objectDisplayed(theObject, theAIS);
++ anAISIO->SetDisplayMode(aDispMode);
++ aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed);
- bool isCustomized = customizeObject(theObject);
- if (isCustomized)
- aContext->Redisplay(anAISIO, false);
-
- if (aCanBeShaded) {
- openLocalContext();
- activateObjects(myActiveSelectionModes);
- myWorkshop->selector()->setSelectedOwners(aSelectedOwners, false);
- }
- else
- activate(anAISIO, myActiveSelectionModes);
- }
++ emit objectDisplayed(theObject, theAIS);
+ activate(anAISIO, myActiveSelectionModes);
+ }
if (isUpdateViewer)
updateViewer();
}