{
Erase (theIObj, theToUpdateViewer);
Load (theIObj, theSelectionMode, theToAllowDecomposition);
+ if (Handle(AIS_GlobalStatus)* aStatusPtr = myObjects.ChangeSeek (theIObj))
+ {
+ (*aStatusPtr)->SetDisplayMode (theDispMode);
+ }
return;
}
{
Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Displayed, theDispMode, theSelectionMode);
myObjects.Bind (theIObj, aStatus);
- Handle(Graphic3d_ViewAffinity) anAffinity = myMainVwr->StructureManager()->RegisterObject (theIObj);
+ myMainVwr->StructureManager()->RegisterObject (theIObj);
myMainPM->Display(theIObj, theDispMode);
if (theSelectionMode != -1)
{
return;
}
- if (theSelMode == -1
- && !theToAllowDecomposition)
+ if (!myObjects.IsBound (theIObj))
{
- if (!myObjects.IsBound (theIObj))
- {
- Standard_Integer aDispMode, aHiMod, aSelModeDef;
- GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef);
- Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Erased, aDispMode, aSelModeDef);
- myObjects.Bind (theIObj, aStatus);
- }
+ Standard_Integer aDispMode, aHiMod, aSelModeDef;
+ GetDefModes (theIObj, aDispMode, aHiMod, aSelModeDef);
+ Handle(AIS_GlobalStatus) aStatus = new AIS_GlobalStatus (AIS_DS_Erased, aDispMode, theSelMode != -1 ? theSelMode : aSelModeDef);
+ myObjects.Bind (theIObj, aStatus);
+ myMainVwr->StructureManager()->RegisterObject (theIObj);
+ }
- // Register theIObj in the selection manager to prepare further activation of selection
- const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
- if (!mgrSelector->Contains (anObj))
- {
- mgrSelector->Load (theIObj);
- }
+ // Register theIObj in the selection manager to prepare further activation of selection
+ const Handle(SelectMgr_SelectableObject)& anObj = theIObj; // to avoid ambiguity
+ if (!mgrSelector->Contains (anObj))
+ {
+ mgrSelector->Load (theIObj);
}
}
Standard_False);
// GS->SubIntensityOn();
myObjects.Bind(anIObj,GS);
+ myMainVwr->StructureManager()->RegisterObject (anIObj);
mgrSelector->Load(anIObj);
mgrSelector->Activate(anIObj,SM,myMainSel);
//! If AllowDecomp = Standard_True and, if the interactive object is of the "Shape" type,
//! these "standard" selection modes will be automatically activated as a function of the modes present in the Local Context.
//! The loaded objects will be selectable but displayable in highlighting only when detected by the Selector.
- //! This method is available only when Local Contexts are open.
Standard_EXPORT void Load (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Integer SelectionMode = -1, const Standard_Boolean AllowDecomp = Standard_False);
//! Hides the object. The object's presentations are simply flagged as invisible and therefore excluded from redrawing.
{
toReDisplay = Standard_True;
}
+ else if (aNameCase == "-erased"
+ || aNameCase == "-load")
+ {
+ aDispStatus = AIS_DS_Erased;
+ }
else
{
aNamesOfDisplayIO.Append (aName);
"\n\t\t: [offsetX offsetY]]]"
"\n\t\t: [-dispMode mode] [-highMode mode]"
"\n\t\t: [-layer index] [-top|-topmost|-overlay|-underlay]"
- "\n\t\t: [-redisplay]"
+ "\n\t\t: [-redisplay] [-erased]"
"\n\t\t: name1 [name2] ... [name n]"
"\n\t\t: Displays named objects."
"\n\t\t: Option -local enables displaying of objects in local"
"\n\t\t: -noupdate Suppresses viewer redraw call."
"\n\t\t: -mutable Enables optimizations for mutable objects."
"\n\t\t: -neutral Draws objects in main viewer."
+ "\n\t\t: -erased Loads the object into context, but does not display it."
"\n\t\t: -layer Sets z-layer for objects."
"\n\t\t: Alternatively -overlay|-underlay|-top|-topmost"
"\n\t\t: options can be used for the default z-layers."