mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-13 20:05:59 +08:00
TopBar: Use RemoveChild() instead of Reparent() during of remove of buttons from TopBar.
Note: Under OSX Reparent() causes a crash. [SPE-2210]
This commit is contained in:
parent
64267d8f5d
commit
b8620d1164
@ -493,7 +493,9 @@ void TopBarItemsCtrl::RemovePage(size_t n)
|
||||
ScalableButton* btn = m_pageButtons[n];
|
||||
m_pageButtons.erase(m_pageButtons.begin() + n);
|
||||
m_buttons_sizer->Remove(n);
|
||||
btn->Reparent(nullptr);
|
||||
|
||||
// Under OSX call of btn->Reparent(nullptr) causes a crash, so as a workaround use RemoveChild() instead
|
||||
this->RemoveChild(btn);
|
||||
btn->Destroy();
|
||||
m_sizer->Layout();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user