0025467: Visualization - Possibility to remove AIS_LocalContext class

Deprecated functionality related to Local Context has been removed.

The following classes and types have been removed:
AIS_LocalContext, AIS_DataMapOfILC, AIS_LocalStatus, SelectMgr_SequenceOfSelector, SelectMgr_DataMapOfObjectSelectors.
Value AIS_DS_Temporary has been removed from enumeration AIS_DisplayStatus.

The following methods related to Local Context have been removed from AIS_InteractiveContext:
::HasOpenedContext(), ::HighestIndex(), ::LocalContext(),
::LocalSelector(), ::OpenLocalContext(), ::CloseLocalContext(),
::IndexOfCurrentLocal(), ::CloseAllContexts(), ::ResetOriginalState(),
::ClearLocalContext(), ::UseDisplayedObjects(), ::NotUseDisplayedObjects(),
::SetShapeDecomposition(), ::SetTemporaryAttributes(),
::ActivateStandardMode(), ::DeactivateStandardMode(), ::KeepTemporary(),
::SubIntensityOn(), ::SubIntensityOff(),
::ActivatedStandardModes(), ::IsInLocal()
and ::AddOrRemoveSelected() taking TopoDS_Shape.

The methods AIS_InteractiveContext::Display() and ::Load()
taking argument theToAllowDecomposition have been marked as deprecated;
the new methods without this unused argument should be used instead.
AIS_InteractiveContext::DisplayedObjects() - removed argument theOnlyFromNeutral.

SelectMgr_SelectionManager has been simplified so that now it support only single Viewer Selector.

The argument -local has been removed from Draw Harness commands vselmode, vremove, vdisplay, vdisplayall, verase.
This commit is contained in:
kgv
2018-06-20 08:48:40 +03:00
parent d9f79dae49
commit 68dcee028d
58 changed files with 449 additions and 7766 deletions

View File

@@ -4343,7 +4343,6 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
}
NCollection_Sequence<TCollection_AsciiString> anObjNames;
Standard_Integer toOpenLocalCtx = -1;
Standard_Integer aSelectionMode = -1;
Standard_Boolean toTurnOn = Standard_True;
AIS_SelectionModesConcurrency aSelModeConcurrency = AIS_SelectionModesConcurrency_GlobalOrLocal;
@@ -4351,15 +4350,10 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
{
TCollection_AsciiString anArgCase (theArgv[anArgIter]);
anArgCase.LowerCase();
if (toOpenLocalCtx == -1
&& anArgCase == "-local")
{
toOpenLocalCtx = 1;
}
else if (anArgCase == "-set"
|| anArgCase == "-replace"
|| anArgCase == "-single"
|| anArgCase == "-exclusive")
if (anArgCase == "-set"
|| anArgCase == "-replace"
|| anArgCase == "-single"
|| anArgCase == "-exclusive")
{
aSelModeConcurrency = AIS_SelectionModesConcurrency_Single;
}
@@ -4428,27 +4422,9 @@ static Standard_Integer VSetSelectionMode (Draw_Interpretor& /*di*/,
anAISContext->DisplayedObjects (aTargetIOs);
}
Standard_DISABLE_DEPRECATION_WARNINGS
if (aSelectionMode == 0 && anAISContext->HasOpenedContext())
{
anAISContext->CloseLocalContext();
}
else if (aSelectionMode != 0 && toTurnOn)
{
if (!anAISContext->HasOpenedContext() && toOpenLocalCtx == 1)
{
anAISContext->OpenLocalContext (Standard_False);
}
}
Standard_ENABLE_DEPRECATION_WARNINGS
for (AIS_ListIteratorOfListOfInteractive aTargetIt (aTargetIOs); aTargetIt.More(); aTargetIt.Next())
{
const Handle(AIS_InteractiveObject)& anIO = aTargetIt.Value();
if (toOpenLocalCtx == 1 && toTurnOn && aSelectionMode != 0)
{
anAISContext->Load (anIO, -1, Standard_True);
}
anAISContext->SetSelectionModeActive (anIO, aSelectionMode, toTurnOn, aSelModeConcurrency);
}
return 0;