mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-18 07:21:09 +00:00
Fix bug showing marching ants from a hidden app::Editor
Widget::isVisible() must return false if the widget isn't inside a ui::Manager
This commit is contained in:
parent
620b206b23
commit
70b0495fdb
@ -288,15 +288,18 @@ void Widget::setFocusMagnet(bool state)
|
||||
bool Widget::isVisible() const
|
||||
{
|
||||
const Widget* widget = this;
|
||||
const Widget* lastWidget = nullptr;
|
||||
|
||||
do {
|
||||
if (widget->flags & JI_HIDDEN)
|
||||
return false;
|
||||
|
||||
lastWidget = widget;
|
||||
widget = widget->m_parent;
|
||||
} while (widget);
|
||||
|
||||
return true;
|
||||
// The widget is visible if it's inside a visible manager
|
||||
return (lastWidget ? lastWidget->type == kManagerWidget: false);
|
||||
}
|
||||
|
||||
bool Widget::isEnabled() const
|
||||
|
Loading…
x
Reference in New Issue
Block a user