Cary Sandvig 25 vuotta sitten
vanhempi
sitoutus
d835222177
2 muutettua tiedostoa jossa 6 lisäystä ja 0 poistoa
  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) {
   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();

+ 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) {
   if (_mgr == (GuiManager*)0L) {
+    /*
     gui_cat.warning()
       << "Tried to switch state of unmanaged button\n";
+    */
     _state = nstate;
     return;
   }