From b739f4506b2be0a4e934f761c428563d8165b3de Mon Sep 17 00:00:00 2001 From: karlis <2995621482@qq.com> Date: Wed, 22 Mar 2023 20:37:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3BoundRect=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=B7=A8=E5=A4=A7=E5=8C=96=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp b/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp index e2405bd..6beb194 100644 --- a/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp +++ b/ArchitectureColoredPainting/src/Editor/LayerWrapper.cpp @@ -466,8 +466,9 @@ void LayerWrapper::paintVisualBounding(QPainter* painter) const layer = layer->parent; } painter->save(); - painter->setTransform(transform); - painter->drawRect(cache.getBoundingRect()); + auto rect = this->cache.getBoundingRect(); + rect = transform.mapRect(rect); + painter->drawRect(rect); painter->restore(); }