Browse Source

more fixes

Cary Sandvig 25 years ago
parent
commit
d835222177
2 changed files with 6 additions and 0 deletions
  1. 4 0
      panda/src/gui/guiButton.I
  2. 2 0
      panda/src/gui/guiButton.cxx

+ 4 - 0
panda/src/gui/guiButton.I

@@ -40,6 +40,7 @@ INLINE void GuiButton::exit(void) {
 
 
 INLINE void GuiButton::up(void) {
 INLINE void GuiButton::up(void) {
   switch (_state) {
   switch (_state) {
+  case NONE:
   case DOWN:
   case DOWN:
   case INACTIVE:
   case INACTIVE:
     switch_state(UP);
     switch_state(UP);
@@ -59,6 +60,7 @@ INLINE void GuiButton::up(void) {
 
 
 INLINE void GuiButton::down(void) {
 INLINE void GuiButton::down(void) {
   switch (_state) {
   switch (_state) {
+  case NONE:
   case UP:
   case UP:
   case INACTIVE:
   case INACTIVE:
     switch_state(DOWN);
     switch_state(DOWN);
@@ -78,6 +80,7 @@ INLINE void GuiButton::down(void) {
 
 
 INLINE void GuiButton::inactive(void) {
 INLINE void GuiButton::inactive(void) {
   switch (_state) {
   switch (_state) {
+  case NONE:
   case UP:
   case UP:
   case DOWN:
   case DOWN:
     switch_state(INACTIVE);
     switch_state(INACTIVE);
@@ -95,6 +98,7 @@ INLINE void GuiButton::inactive(void) {
 
 
 INLINE void GuiButton::click(void) {
 INLINE void GuiButton::click(void) {
   switch (_state) {
   switch (_state) {
+  case NONE:
   case UP:
   case UP:
   case UP_ROLLOVER:
   case UP_ROLLOVER:
     down();
     down();

+ 2 - 0
panda/src/gui/guiButton.cxx

@@ -112,8 +112,10 @@ static void click_button_up(CPT_Event e) {
 
 
 void GuiButton::switch_state(GuiButton::States nstate) {
 void GuiButton::switch_state(GuiButton::States nstate) {
   if (_mgr == (GuiManager*)0L) {
   if (_mgr == (GuiManager*)0L) {
+    /*
     gui_cat.warning()
     gui_cat.warning()
       << "Tried to switch state of unmanaged button\n";
       << "Tried to switch state of unmanaged button\n";
+    */
     _state = nstate;
     _state = nstate;
     return;
     return;
   }
   }