mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-21 12:40:34 +00:00
Stop propagation of keyboard messages if a child use it
This fix a new bug with the new EditorView's scroll-bars. As 1,2,3,4,5,6 keys change the zoom, they will change the viewport size, and scroll-bars will be removed/added. We cannot continue iterating the View::m_children collection after m_children is modified (scroll-bars are removed/added).
This commit is contained in:
parent
d3c72bedf2
commit
936b741f90
@ -1234,7 +1234,8 @@ bool Widget::onProcessMessage(Message* msg)
|
||||
if (static_cast<KeyMessage*>(msg)->propagateToChildren()) {
|
||||
// Broadcast the message to the children.
|
||||
UI_FOREACH_WIDGET(getChildren(), it)
|
||||
(*it)->sendMessage(msg);
|
||||
if ((*it)->sendMessage(msg))
|
||||
return true;
|
||||
}
|
||||
|
||||
// Propagate the message to the parent.
|
||||
|
Loading…
x
Reference in New Issue
Block a user