diff options
author | corvid <corvid@lavabit.com> | 2009-08-10 12:52:30 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-08-10 12:52:30 +0000 |
commit | d3b6eb7ee9c7c3c2492f9181ad6f882a57ff7d84 (patch) | |
tree | c7fe86bf971b1e1ede760b03d30cf3825eb642c8 /dw/fltkcomplexbutton.cc | |
parent | 938ef1f004a5c22c665e9ec94e0b07cfc80e860d (diff) |
test for exactly TOGGLE type in fltk complex button.
It is of GROUP_TYPE, which meant a false positive.
It would probably be best to rip out the TOGGLE/RADIO
stuff and much of the when() code and so on.
Diffstat (limited to 'dw/fltkcomplexbutton.cc')
-rw-r--r-- | dw/fltkcomplexbutton.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dw/fltkcomplexbutton.cc b/dw/fltkcomplexbutton.cc index 33ea40e7..72960910 100644 --- a/dw/fltkcomplexbutton.cc +++ b/dw/fltkcomplexbutton.cc @@ -110,7 +110,7 @@ int ComplexButton::handle(int event, const Rectangle& rectangle) { redraw(DAMAGE_VALUE); if (type() == RADIO) setonly(); - else if (type()) // TOGGLE + else if (type() == TOGGLE) state(!initial_state); else { state(initial_state); @@ -137,7 +137,7 @@ int ComplexButton::handle(int event, const Rectangle& rectangle) { setonly(); if (when() & WHEN_CHANGED) do_callback(); else set_changed(); } - } else if (type()) { // TOGGLE + } else if (type() == TOGGLE) { state(!state()); if (when() & WHEN_CHANGED) do_callback(); else set_changed(); } |