fix: crash on windows

This commit is contained in:
peachismomo
2026-08-06 06:08:02 +08:00
parent acb0be6ed9
commit ef4815b26c
4 changed files with 67 additions and 14 deletions
+6 -2
View File
@@ -8477,8 +8477,12 @@ void Page::activate(ConfigOptionMode mode, std::function<void()> throw_if_cancel
#ifdef __WXMSW__
// BBS: fix field control position
wxTheApp->CallAfter([this]() {
for (auto group : m_optgroups) {
wxTheApp->CallAfter([wp = std::weak_ptr<Page>(shared_from_this())]() {
auto page = wp.lock();
if (!page)
return;
for (auto group : page->m_optgroups) {
if (group->custom_ctrl)
group->custom_ctrl->fixup_items_positions();
}