Author: AlbrechtS
Date: 2011-10-26 03:29:13 -0700 (Wed, 26 Oct 2011)
New Revision: 9149
Log:
Fixed regression (in FLTK 1.3.0) that could clear a radio button by
using the keyboard (space or shortcut) (STR #2748).
This regression was introduced in svn r7826 and released with FLTK 1.3.0 (!)
to add visual feedback for Fl_Button's using the keyboard (STR #2372).


Modified:
   branches/branch-1.3/CHANGES
   branches/branch-1.3/src/Fl_Button.cxx

Modified: branches/branch-1.3/CHANGES
===================================================================
--- branches/branch-1.3/CHANGES 2011-10-26 09:16:35 UTC (rev 9148)
+++ branches/branch-1.3/CHANGES 2011-10-26 10:29:13 UTC (rev 9149)
@@ -1,6 +1,8 @@
 
 CHANGES IN FLTK 1.3.1
 
+       - Fixed regression (in FLTK 1.3.0) that could clear a radio
+         button by using the keyboard (space or shortcut) (STR #2748)
        - Fixed fl_pie() drawing too small on X11 (STR #2703)
        - Fixed Fl_Menu issue with unusual menu flags (STR #2680)
        - Fixed Windows DLL import of fl_xid() (STR #2670)

Modified: branches/branch-1.3/src/Fl_Button.cxx
===================================================================
--- branches/branch-1.3/src/Fl_Button.cxx       2011-10-26 09:16:35 UTC (rev 
9148)
+++ branches/branch-1.3/src/Fl_Button.cxx       2011-10-26 10:29:13 UTC (rev 
9149)
@@ -145,9 +145,11 @@
       set_changed();
     triggered_by_keyboard:
       Fl_Widget_Tracker wp(this);
-      if (type() == FL_RADIO_BUTTON && !value_) {
-       setonly();
-       if (when() & FL_WHEN_CHANGED) do_callback();
+      if (type() == FL_RADIO_BUTTON) {
+        if (!value_) {
+         setonly();
+         if (when() & FL_WHEN_CHANGED) do_callback();
+        }
       } else if (type() == FL_TOGGLE_BUTTON) {
        value(!value());
        if (when() & FL_WHEN_CHANGED) do_callback();

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to