]> OCCT Git - occt.git/commitdiff
0032975: Visualization, TKOpenGl - do not blit inactive Subview
authorkgv <kgv@opencascade.com>
Mon, 16 May 2022 19:28:09 +0000 (22:28 +0300)
committersmoskvin <smoskvin@opencascade.com>
Tue, 17 May 2022 17:13:42 +0000 (20:13 +0300)
src/OpenGl/OpenGl_View.cxx
src/V3d/V3d_View.cxx

index 5875e6df596291aaff87929b409db83573dc0539..9eb16aeae755d94ab66b7efbf879c43ecafa5fc3 100644 (file)
@@ -2225,6 +2225,11 @@ bool OpenGl_View::blitSubviews (const Graphic3d_Camera::Projection ,
   for (const Handle(Graphic3d_CView)& aChildIter : mySubviews)
   {
     OpenGl_View* aSubView = dynamic_cast<OpenGl_View*> (aChildIter.get());
+    if (!aSubView->IsActive())
+    {
+      continue;
+    }
+
     const Handle(OpenGl_FrameBuffer)& aChildFbo = !aSubView->myImmediateSceneFbos[0].IsNull()
                                                  ? aSubView->myImmediateSceneFbos[0]
                                                  : aSubView->myMainSceneFbos[0];
index f6050cf34b66e2157d888b427e36d3bc3bbc7af3..e61691a13bdcf369757c286e6765070164d645b4 100644 (file)
@@ -348,7 +348,8 @@ Handle(V3d_View) V3d_View::PickSubview (const Graphic3d_Vec2i& thePnt) const
   for (Standard_Integer aSubviewIter = mySubviews.Upper(); aSubviewIter >= mySubviews.Lower(); --aSubviewIter)
   {
     const Handle(V3d_View)& aSubview = mySubviews.Value (aSubviewIter);
-    if (thePnt.x() >= aSubview->View()->SubviewTopLeft().x()
+    if (aSubview->View()->IsActive()
+     && thePnt.x() >= aSubview->View()->SubviewTopLeft().x()
      && thePnt.x() < (aSubview->View()->SubviewTopLeft().x() + aSubview->Window()->Dimensions().x())
      && thePnt.y() >= aSubview->View()->SubviewTopLeft().y()
      && thePnt.y() < (aSubview->View()->SubviewTopLeft().y() + aSubview->Window()->Dimensions().y()))