0029367: Visualization - simplify interface of V3d_View and V3d_Viewer
[occt.git] / tools / View / View_Displayer.cxx
index e218cae..50d41a9 100644 (file)
@@ -284,9 +284,10 @@ Handle(V3d_View) View_Displayer::GetView() const
   const Handle(V3d_Viewer)& aViewer = GetContext()->CurrentViewer();
   if (!aViewer.IsNull())
   {
-    aViewer->InitActiveViews();
-    if (aViewer->MoreActiveViews())
-      aView = aViewer->ActiveView();
+    if (!aViewer->ActiveViews().IsEmpty())
+    {
+      aView = aViewer->ActiveViews().First();
+    }
   }
   return aView;
 }