[aseprite] 118/308: Avoid closing BrushPopup when we click the menu popup option

Tobias Hansen thansen at moszumanska.debian.org
Tue Mar 8 02:44:59 UTC 2016


This is an automated email from the git hooks/post-receive script.

thansen pushed a commit to branch master
in repository aseprite.

commit bd99a301469fcc9856085c953526d0fab331e33a
Author: David Capello <davidcapello at gmail.com>
Date:   Wed Dec 16 10:02:52 2015 -0300

    Avoid closing BrushPopup when we click the menu popup option
---
 src/app/ui/brush_popup.cpp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/app/ui/brush_popup.cpp b/src/app/ui/brush_popup.cpp
index a333d8d..bcd2fa2 100644
--- a/src/app/ui/brush_popup.cpp
+++ b/src/app/ui/brush_popup.cpp
@@ -138,9 +138,17 @@ private:
     // Here we make the popup window temporaly floating, so it's
     // not closed by the popup menu.
     m_popup->makeFloating();
+
     menu.showPopup(gfx::Point(origin().x, origin().y+bounds().h));
+
+    // Add the menu popup region to the hot region so the BrushPopup (m_popup)
+    // isn't closed after we click the menu popup.
     m_popup->makeFixed();
-    m_popup->closeWindow(nullptr);
+
+    gfx::Region rgn;
+    rgn.createUnion(gfx::Region(m_popup->bounds()),
+                    gfx::Region(menu.bounds()));
+    m_popup->setHotRegion(rgn);
   }
 
 private:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/aseprite.git



More information about the Pkg-games-commits mailing list