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
This commit is contained in:
Michael R Sweet 2005-05-12 13:34:36 +00:00
parent 34d5a8b16e
commit b289065e65
2 changed files with 8 additions and 1 deletions

View File

@ -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.

View File

@ -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;