From 620b206b23b29d12d864c98c2c5a9d73fe8e4d7e Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 26 Mar 2015 10:43:39 -0300 Subject: [PATCH 1/2] Remove unused variable --- src/app/ui/skin/skin_theme.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/ui/skin/skin_theme.cpp b/src/app/ui/skin/skin_theme.cpp index 641ecd354..a9017cc91 100644 --- a/src/app/ui/skin/skin_theme.cpp +++ b/src/app/ui/skin/skin_theme.cpp @@ -2172,7 +2172,7 @@ she::Font* SkinTheme::loadFont(const char* userFont, const std::string& path) f->setSize(8); return f; } - catch (const std::exception& ex) { + catch (const std::exception&) { // Do nothing } } From 70b0495fdb2097153ccce4b9e054211fc355a9b8 Mon Sep 17 00:00:00 2001 From: David Capello Date: Thu, 26 Mar 2015 10:49:12 -0300 Subject: [PATCH 2/2] Fix bug showing marching ants from a hidden app::Editor Widget::isVisible() must return false if the widget isn't inside a ui::Manager --- src/ui/widget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ui/widget.cpp b/src/ui/widget.cpp index 8d11eb5d2..3fa11d186 100644 --- a/src/ui/widget.cpp +++ b/src/ui/widget.cpp @@ -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