From d83522217721edbb2f13deddb30bef002193b956 Mon Sep 17 00:00:00 2001 From: Cary Sandvig Date: Wed, 21 Mar 2001 20:22:34 +0000 Subject: [PATCH] more fixes --- panda/src/gui/guiButton.I | 4 ++++ panda/src/gui/guiButton.cxx | 2 ++ 2 files changed, 6 insertions(+) diff --git a/panda/src/gui/guiButton.I b/panda/src/gui/guiButton.I index 14194cc3a7..2e3ba5761f 100644 --- a/panda/src/gui/guiButton.I +++ b/panda/src/gui/guiButton.I @@ -40,6 +40,7 @@ INLINE void GuiButton::exit(void) { INLINE void GuiButton::up(void) { switch (_state) { + case NONE: case DOWN: case INACTIVE: switch_state(UP); @@ -59,6 +60,7 @@ INLINE void GuiButton::up(void) { INLINE void GuiButton::down(void) { switch (_state) { + case NONE: case UP: case INACTIVE: switch_state(DOWN); @@ -78,6 +80,7 @@ INLINE void GuiButton::down(void) { INLINE void GuiButton::inactive(void) { switch (_state) { + case NONE: case UP: case DOWN: switch_state(INACTIVE); @@ -95,6 +98,7 @@ INLINE void GuiButton::inactive(void) { INLINE void GuiButton::click(void) { switch (_state) { + case NONE: case UP: case UP_ROLLOVER: down(); diff --git a/panda/src/gui/guiButton.cxx b/panda/src/gui/guiButton.cxx index 271350c9cb..532bb512d8 100644 --- a/panda/src/gui/guiButton.cxx +++ b/panda/src/gui/guiButton.cxx @@ -112,8 +112,10 @@ static void click_button_up(CPT_Event e) { void GuiButton::switch_state(GuiButton::States nstate) { if (_mgr == (GuiManager*)0L) { + /* gui_cat.warning() << "Tried to switch state of unmanaged button\n"; + */ _state = nstate; return; }