prevent btn2 TumbleTextBox updates when disabled
authorGood Guy <[email protected]>
Tue, 4 Jul 2017 22:49:36 +0000 (16:49 -0600)
committerGood Guy <[email protected]>
Tue, 4 Jul 2017 22:49:36 +0000 (16:49 -0600)
cinelerra-5.1/guicast/bctextbox.C

index ef3ffb1f587f652b3a4e43fc20583557d9077627..5c8a8f93c730647f466e5b9f9ba0399dab4d1e69 100644 (file)
@@ -2587,19 +2587,10 @@ int BC_TumbleTextBoxText::handle_event()
 
 int BC_TumbleTextBoxText::button_press_event()
 {
-       if(is_event_win())
-       {
-               if(get_buttonpress() < 4) return BC_TextBox::button_press_event();
-
-               if(get_buttonpress() == 4)
-               {
-                       popup->tumbler->handle_up_event();
-               }
-               else
-               if(get_buttonpress() == 5)
-               {
-                       popup->tumbler->handle_down_event();
-               }
+       if( get_enabled() && is_event_win() ) {
+               if( get_buttonpress() < 4 ) return BC_TextBox::button_press_event();
+               if( get_buttonpress() == 4 )      popup->tumbler->handle_up_event();
+               else if( get_buttonpress() == 5 ) popup->tumbler->handle_down_event();
                return 1;
        }
        return 0;