From a19a1f067e5a101c18b62db6fc56eeb132ea32ee Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 3 Aug 2017 17:34:37 +0200 Subject: [PATCH] CComponentsItem: fix possible issues with position inside forms This ensures relative position for items inside form --- src/gui/components/cc_item.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index 54c335c9a..be2e6678a 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -265,14 +265,14 @@ void CComponentsItem::setXPos(const int& xpos) { CCDraw::setXPos(xpos); if (cc_parent) - cc_xr = cc_parent->getXPos() + x; + cc_xr = cc_parent->getRealXPos() + x; } void CComponentsItem::setYPos(const int& ypos) { CCDraw::setYPos(ypos); if (cc_parent) - cc_yr = cc_parent->getYPos() + y; + cc_yr = cc_parent->getRealYPos() + y; } void CComponentsItem::setXPosP(const uint8_t& xpos_percent)