*ColorPopup: Fixed crashing in Linux

git-svn-id: svn://ultimatepp.org/upp/trunk@3815 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-09-04 15:09:27 +00:00
parent ba2f88045c
commit ea96647ca6
2 changed files with 5 additions and 1 deletions

View file

@ -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);

View file

@ -167,6 +167,7 @@ private:
bool notnull;
bool scolors;
bool norampwheel;
bool animating;
String nulltext;
Color color;