mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-04 08:46:09 +00:00
Fix BrushPopup bug disappearing when mouse moves to other brush type
There were an old bug where the brush popup changed its behavior after opening a BrushSlotParams menu popup i.e. after that the BrushPopup disappeared just leaving the mouse outside its hot region (but before that it disappeared clicking outside the BrushPopup). Anyway with this change the BrushPopup will disappear only clicking outside the popup in all cases.
This commit is contained in:
parent
d1dcbcbad0
commit
e4e8bfb246
@ -58,20 +58,7 @@ void show_popup_menu(PopupWindow* popupWindow,
|
||||
const gfx::Point& pt,
|
||||
Display* display)
|
||||
{
|
||||
// Here we make the popup window temporaly floating, so it's
|
||||
// not closed by the popup menu.
|
||||
popupWindow->makeFloating();
|
||||
|
||||
popupMenu->showPopup(pt, display);
|
||||
|
||||
// Add the menu popup region to the window popup hot region so it's
|
||||
// not closed after we close the menu.
|
||||
popupWindow->makeFixed();
|
||||
|
||||
gfx::Region rgn;
|
||||
rgn.createUnion(gfx::Region(popupWindow->boundsOnScreen()),
|
||||
gfx::Region(popupMenu->boundsOnScreen()));
|
||||
popupWindow->setHotRegion(rgn);
|
||||
}
|
||||
|
||||
class SelectBrushItem : public ButtonSet::Item {
|
||||
|
Loading…
Reference in New Issue
Block a user