diff --git a/uppsrc/CtrlLib/ColorPopup.cpp b/uppsrc/CtrlLib/ColorPopup.cpp index 46c3011e2..7d6a6904d 100644 --- a/uppsrc/CtrlLib/ColorPopup.cpp +++ b/uppsrc/CtrlLib/ColorPopup.cpp @@ -260,7 +260,7 @@ Color ColorPopUp::Get() const } void ColorPopUp::PopupDeactivate() { - if(popup && popup->IsOpen()) { + if(popup && popup->IsOpen() && !animating) { popup.Clear(); IgnoreMouseClick(); WhenCancel(); @@ -305,10 +305,12 @@ void ColorPopUp::PopUp(Ctrl *owner, Color c) colori = -1; if(GUI_PopUpEffect()) { + animating = true; popup->PopUp(owner, true, true, GUI_GlobalStyle() >= GUISTYLE_XP); SetFocus(); Ctrl::ProcessEvents(); Animate(*popup, rt, GUIEFFECT_SLIDE); + animating = false; } popup->SetRect(rt); @@ -328,6 +330,7 @@ ColorPopUp::ColorPopUp() norampwheel = false; notnull = false; scolors = false; + animating = false; SetFrame(MenuFrame()); Add(ramp); Add(wheel); diff --git a/uppsrc/CtrlLib/DlgColor.h b/uppsrc/CtrlLib/DlgColor.h index 3f1ef383e..b93791e0b 100644 --- a/uppsrc/CtrlLib/DlgColor.h +++ b/uppsrc/CtrlLib/DlgColor.h @@ -167,6 +167,7 @@ private: bool notnull; bool scolors; bool norampwheel; + bool animating; String nulltext; Color color;