Author: AlbrechtS
Date: 2011-10-26 03:46:52 -0700 (Wed, 26 Oct 2011)
New Revision: 9150
Log:
Fixed regression (in FLTK 1.3.0) that could clear a radio button by
using the keyboard (space or shortcut) (STR #2748).
Modified:
branches/branch-3.0/src/fltk3/Button.cxx
Modified: branches/branch-3.0/src/fltk3/Button.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/Button.cxx 2011-10-26 10:29:13 UTC (rev
9149)
+++ branches/branch-3.0/src/fltk3/Button.cxx 2011-10-26 10:46:52 UTC (rev
9150)
@@ -162,9 +162,11 @@
set_changed();
triggered_by_keyboard:
fltk3::WidgetTracker wp(this);
- if (type() == fltk3::RADIO_BUTTON && !value_) {
- setonly();
- if (when() & fltk3::WHEN_CHANGED) do_callback();
+ if (type() == fltk3::RADIO_BUTTON) {
+ if (!value_) {
+ setonly();
+ if (when() & fltk3::WHEN_CHANGED) do_callback();
+ }
} else if (type() == fltk3::TOGGLE_BUTTON) {
value(!value());
if (when() & fltk3::WHEN_CHANGED) do_callback();
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit