mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 19:26:04 +08:00
Fix of #10890 (crash when switching light/dark mode with Height Range Modifier active)
This commit is contained in:
parent
2d6d37f685
commit
4981b33b01
@ -283,7 +283,7 @@ void ObjectLayers::sys_color_changed()
|
|||||||
if (item->IsSizer()) {// case when we have editor with buttons
|
if (item->IsSizer()) {// case when we have editor with buttons
|
||||||
for (size_t btn : {2, 3}) { // del_btn, add_btn
|
for (size_t btn : {2, 3}) { // del_btn, add_btn
|
||||||
wxSizerItem* b_item = item->GetSizer()->GetItem(btn);
|
wxSizerItem* b_item = item->GetSizer()->GetItem(btn);
|
||||||
if (b_item->IsWindow()) {
|
if (b_item && b_item->IsWindow()) {
|
||||||
auto button = dynamic_cast<PlusMinusButton*>(b_item->GetWindow());
|
auto button = dynamic_cast<PlusMinusButton*>(b_item->GetWindow());
|
||||||
if (button != nullptr)
|
if (button != nullptr)
|
||||||
button->sys_color_changed();
|
button->sys_color_changed();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user