Avoid closing BrushPopup when we click the menu popup option

This commit is contained in:
David Capello 2015-12-16 10:02:52 -03:00
parent fd8e8686d5
commit bd99a30146

View File

@ -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: