0021306: Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
[occt.git] / src / AIS / AIS_GlobalStatus.cxx
index ee999f7..04bc386 100644 (file)
@@ -15,6 +15,7 @@
 // commercial license or contractual agreement.
 
 
+#include <AIS_DisplayMode.hxx>
 #include <AIS_GlobalStatus.hxx>
 #include <Standard_Type.hxx>
 #include <TColStd_ListIteratorOfListOfInteger.hxx>
@@ -23,6 +24,7 @@ IMPLEMENT_STANDARD_RTTIEXT(AIS_GlobalStatus,MMgt_TShared)
 
 AIS_GlobalStatus::AIS_GlobalStatus():
 myStatus(AIS_DS_None),
+myDispMode(AIS_WireFrame),
 myLayerIndex(0),
 myIsHilit(Standard_False),
 myHiCol(Quantity_NOC_WHITE),
@@ -37,28 +39,15 @@ AIS_GlobalStatus::AIS_GlobalStatus(const AIS_DisplayStatus DS,
                                   const Quantity_NameOfColor TheHiCol,
                                   const Standard_Integer Layer):
 myStatus(DS),
+myDispMode(DMode),
 myLayerIndex(Layer),
 myIsHilit(Standard_False),
 myHiCol(TheHiCol),
 mySubInt(Standard_False)
 {
-  myDispModes.Append(DMode);
   mySelModes.Append(SMode);
 }
 
-void AIS_GlobalStatus::RemoveDisplayMode(const Standard_Integer aMode)
-{
-  TColStd_ListIteratorOfListOfInteger anIt (myDispModes);
-  for (; anIt.More(); anIt.Next())
-  {
-    if (anIt.Value() == aMode)
-    {
-      myDispModes.Remove (anIt);
-      return;
-    }
-  }
-}
-
 void AIS_GlobalStatus::RemoveSelectionMode(const Standard_Integer aMode)
 {
   TColStd_ListIteratorOfListOfInteger anIt (mySelModes);
@@ -77,19 +66,6 @@ void AIS_GlobalStatus::ClearSelectionModes()
   mySelModes.Clear();
 }
 
-Standard_Boolean AIS_GlobalStatus::IsDModeIn(const Standard_Integer aMode) const 
-{
-  TColStd_ListIteratorOfListOfInteger anIt (myDispModes);
-  for (; anIt.More(); anIt.Next())
-  {
-    if (anIt.Value() == aMode)
-    {
-      return Standard_True;
-    }
-  }
-  return Standard_False;
-}
-
 Standard_Boolean AIS_GlobalStatus::IsSModeIn(const Standard_Integer aMode) const 
 {
   TColStd_ListIteratorOfListOfInteger anIt (mySelModes);