From 10e3aec9cced8e35992e774776865714b7a0de1a Mon Sep 17 00:00:00 2001 From: Nomango Date: Sat, 8 Aug 2020 15:12:08 +0800 Subject: [PATCH] update Actor --- src/kiwano/2d/Actor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/kiwano/2d/Actor.cpp b/src/kiwano/2d/Actor.cpp index 5cbd0f20..80935bba 100644 --- a/src/kiwano/2d/Actor.cpp +++ b/src/kiwano/2d/Actor.cpp @@ -148,6 +148,9 @@ void Actor::PrepareToRender(RenderContext& ctx) void Actor::RenderBorder(RenderContext& ctx) { + if (!visible_) + return; + if (show_border_ && !size_.IsOrigin()) { Rect bounds = GetBounds(); @@ -373,7 +376,7 @@ void Actor::SetStage(Stage* stage) stage_ = stage; for (auto& child : children_) { - child->stage_ = stage; + child->SetStage(stage); } } }