summaryrefslogtreecommitdiff
path: root/src/Fl_Positioner.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2004-07-27 16:02:21 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2004-07-27 16:02:21 +0000
commit62c19c63d6d915b153a09be98f7da8e049f9b4e3 (patch)
treedb80481c3b09b7129033d15a7673ecf59cb902cb /src/Fl_Positioner.cxx
parenta529510e5b8f84b15aacd103936df89bb767bb29 (diff)
More doco updates.
All of the core widgets now consistently set changed() before calling the callback function for a change in value; this allows programs to check the changed() state in a callback to see why they are being called (STR #475) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3713 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Positioner.cxx')
-rw-r--r--src/Fl_Positioner.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Fl_Positioner.cxx b/src/Fl_Positioner.cxx
index 0540b644a..1c356ee2d 100644
--- a/src/Fl_Positioner.cxx
+++ b/src/Fl_Positioner.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $"
+// "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.5 2004/07/27 16:02:21 easysw Exp $"
//
// Positioner widget for the Fast Light Tool Kit (FLTK).
//
@@ -89,9 +89,11 @@ int Fl_Positioner::handle(int event, int X, int Y, int W, int H) {
if (yy > ymax) yy = ymax;
if (value(xx, yy)) set_changed();}
if (!(when() & FL_WHEN_CHANGED ||
- when() & FL_WHEN_RELEASE && event == FL_RELEASE)) return 1;
+ (when() & FL_WHEN_RELEASE && event == FL_RELEASE))) return 1;
if (changed() || when()&FL_WHEN_NOT_CHANGED) {
- clear_changed(); do_callback();}
+ if (event == FL_RELEASE) clear_changed();
+ do_callback();
+ }
return 1;
default:
return 0;
@@ -129,5 +131,5 @@ void Fl_Positioner::ybounds(double a, double b) {
}
//
-// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.4 2004/04/11 04:38:58 easysw Exp $".
+// End of "$Id: Fl_Positioner.cxx,v 1.4.2.3.2.5 2004/07/27 16:02:21 easysw Exp $".
//