FIX: reduce ams update

Change-Id: I6a3c34580df77135c3b56e9273edc7643d58eec3
Jira: STUDIO-10383
(cherry picked from commit c52e54e58a1250e7b0701a29771b130e7d5dc8b0)
This commit is contained in:
chunmao.guo
2025-02-13 18:57:05 +08:00
committed by Noisyfox
parent 348f59ac67
commit d9df920c23
2 changed files with 18 additions and 10 deletions

View File

@@ -26,7 +26,7 @@ void StaticGroup::ShowBadge(bool show)
badge->SetBackgroundColour("#F7F7F7");
LayoutBadge();
}
if (badge)
if (badge && badge->IsShown() != show)
badge->Show(show);
#endif
}
@@ -74,8 +74,9 @@ void StaticGroup::PaintForeground(wxDC &dc, const struct tagRECT &rc)
void StaticGroup::DoSetSize(int x, int y, int width, int height, int sizeFlags)
{
auto size = GetSize();
wxStaticBox::DoSetSize(x, y, width, height, sizeFlags);
if (badge)
if (badge && size != GetSize())
LayoutBadge();
}