From e68c0d7fcd4ef8e1041ebcf608daccb3f7a1f28b Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Fri, 8 Sep 2023 15:49:25 +0300 Subject: [PATCH] Fix ontab keeping scroll --- loader/src/ui/internal/list/ModListLayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/src/ui/internal/list/ModListLayer.cpp b/loader/src/ui/internal/list/ModListLayer.cpp index ae936bed..df4fbecc 100644 --- a/loader/src/ui/internal/list/ModListLayer.cpp +++ b/loader/src/ui/internal/list/ModListLayer.cpp @@ -669,7 +669,7 @@ void ModListLayer::onTab(CCObject* pSender) { if (pSender) { g_tab = static_cast(pSender->getTag()); } - this->reloadList(); + this->reloadList(false); auto toggleTab = [this](CCMenuItemToggler* member) -> void { auto isSelected = member->getTag() == static_cast(g_tab); @@ -681,7 +681,7 @@ void ModListLayer::onTab(CCObject* pSender) { targetMenu->addChild(member); member->release(); } - if (isSelected) + if (isSelected && m_tabsGradientStencil) m_tabsGradientStencil->setPosition(member->m_onButton->convertToWorldSpace({0.f, -1.f})); };