From dcbd679c8b9b75e9aea8df46f5f0065dcfeea723 Mon Sep 17 00:00:00 2001 From: kgv Date: Mon, 16 May 2022 22:28:09 +0300 Subject: [PATCH] 0032975: Visualization, TKOpenGl - do not blit inactive Subview --- src/OpenGl/OpenGl_View.cxx | 5 +++++ src/V3d/V3d_View.cxx | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/OpenGl/OpenGl_View.cxx b/src/OpenGl/OpenGl_View.cxx index 5875e6df59..9eb16aeae7 100644 --- a/src/OpenGl/OpenGl_View.cxx +++ b/src/OpenGl/OpenGl_View.cxx @@ -2225,6 +2225,11 @@ bool OpenGl_View::blitSubviews (const Graphic3d_Camera::Projection , for (const Handle(Graphic3d_CView)& aChildIter : mySubviews) { OpenGl_View* aSubView = dynamic_cast (aChildIter.get()); + if (!aSubView->IsActive()) + { + continue; + } + const Handle(OpenGl_FrameBuffer)& aChildFbo = !aSubView->myImmediateSceneFbos[0].IsNull() ? aSubView->myImmediateSceneFbos[0] : aSubView->myMainSceneFbos[0]; diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index f6050cf34b..e61691a13b 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -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()))