From e11f489750c93e782e22e238a29de7ba3b6be4b3 Mon Sep 17 00:00:00 2001 From: halx99 Date: Fri, 3 Sep 2021 10:49:44 +0800 Subject: [PATCH] Fix #491 --- cocos/ui/UIScale9Sprite.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/ui/UIScale9Sprite.cpp b/cocos/ui/UIScale9Sprite.cpp index a256098c71..2eaece828c 100644 --- a/cocos/ui/UIScale9Sprite.cpp +++ b/cocos/ui/UIScale9Sprite.cpp @@ -431,6 +431,8 @@ void Scale9Sprite::copyTo(Scale9Sprite* copy) const copy->setRenderingType(_renderingType); copy->setScale9Enabled(isScale9Enabled()); + // setStretchEnabled after setScale9Enabled, fix issue: https://github.com/adxeproject/adxe/issues/491 + copy->setStretchEnabled(isStretchEnabled()); copy->_isPatch9 = _isPatch9; copy->_brightState = _brightState;