From d6caf3aff8f9be57e15491134e4f6fb6941c2a17 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Thu, 2 Mar 2000 19:10:49 +0000 Subject: [PATCH] Fl_Button and friends didn't honor FL_WHEN_NOT_CHANGED. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1020 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Button.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Fl_Button.cxx b/src/Fl_Button.cxx index a2b355b86..888ee7fbd 100644 --- a/src/Fl_Button.cxx +++ b/src/Fl_Button.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Button.cxx,v 1.4 1999/01/07 19:17:17 mike Exp $" +// "$Id: Fl_Button.cxx,v 1.4.2.1 2000/03/02 19:10:49 mike Exp $" // // Button widget for the Fast Light Tool Kit (FLTK). // @@ -77,7 +77,10 @@ int Fl_Button::handle(int event) { } return 1; case FL_RELEASE: - if (value_ == oldval) return 1; + if (value_ == oldval) { + if (when() & FL_WHEN_NOT_CHANGED) do_callback(); + return 1; + } if (type() == FL_RADIO_BUTTON) setonly(); else if (type() == FL_TOGGLE_BUTTON) @@ -115,5 +118,5 @@ Fl_Button::Fl_Button(int x,int y,int w,int h, const char *l) } // -// End of "$Id: Fl_Button.cxx,v 1.4 1999/01/07 19:17:17 mike Exp $". +// End of "$Id: Fl_Button.cxx,v 1.4.2.1 2000/03/02 19:10:49 mike Exp $". //