mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-30 04:20:23 +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
|
bool Widget::isVisible() const
|
||||||
{
|
{
|
||||||
const Widget* widget = this;
|
const Widget* widget = this;
|
||||||
|
const Widget* lastWidget = nullptr;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (widget->flags & JI_HIDDEN)
|
if (widget->flags & JI_HIDDEN)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
lastWidget = widget;
|
||||||
widget = widget->m_parent;
|
widget = widget->m_parent;
|
||||||
} while (widget);
|
} 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
|
bool Widget::isEnabled() const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user