mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 03:39:51 +00:00
When a widget is removed (through Widget::removeChild) we've to remove it from its ui::Manager
A widget without parent, cannot be part of the Manager (e.g. cannot be the capture widget, or focused, or the widget with mouse).
This commit is contained in:
parent
dcd8627406
commit
1d76e0d545
@ -477,6 +477,11 @@ void Widget::removeChild(Widget* child)
|
|||||||
if (it != m_children.end())
|
if (it != m_children.end())
|
||||||
m_children.erase(it);
|
m_children.erase(it);
|
||||||
|
|
||||||
|
// Free from manager
|
||||||
|
Manager* manager = getManager();
|
||||||
|
if (manager)
|
||||||
|
manager->freeWidget(this);
|
||||||
|
|
||||||
child->m_parent = NULL;
|
child->m_parent = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user