summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 13:34:36 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-05-12 13:34:36 +0000
commitb289065e65f96153a512808b53fd9e452029d0f5 (patch)
treeaffdd16993ef213772aa0e25a51c91177477f69b
parent34d5a8b16e752e80755f7d21660bc991525dab49 (diff)
Fl_Browser_ was calling the callback multiple times for a single
selection change with FL_WHEN_CHANGED (STR #834) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4328 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--CHANGES3
-rw-r--r--src/Fl_Browser_.cxx6
2 files changed, 8 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index afaf2fe21..55bac2791 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@ CHANGES IN FLTK 1.1.7
- Documentation fixes (STR #648, STR #692, STR #730, STR
#744, STR #745)
+ - Fl_Browser_ was calling the callback multiple times for
+ a single selection change with FL_WHEN_CHANGED (STR
+ #834)
- Added "filenew", "fileopen", "filesave", "filesaveas",
and "fileprint" symbols with standard toolbar
symbology.
diff --git a/src/Fl_Browser_.cxx b/src/Fl_Browser_.cxx
index e73ba49c2..869c862e4 100644
--- a/src/Fl_Browser_.cxx
+++ b/src/Fl_Browser_.cxx
@@ -610,7 +610,11 @@ int Fl_Browser_::handle(int event) {
if (type() == FL_NORMAL_BROWSER || !top_)
;
else if (type() != FL_MULTI_BROWSER) {
- change = select_only(find_item(my), when() & FL_WHEN_CHANGED);
+ change = select_only(find_item(my), 0);
+ if (change && (when() & FL_WHEN_CHANGED)) {
+ set_changed();
+ do_callback();
+ }
} else {
void* l = find_item(my);
whichway = 1;