1) Invoke callback if when(FL_WHEN_RELEASE)
2) Removed unintended fallthrough from FL_DRAG -> FL_RELEASE handler. 3) Removed redundant redraw() calls git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7599 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
3ef47f712a
commit
e874b086ac
@ -304,12 +304,12 @@ int Fl_Tree::handle(int e) {
|
||||
changed = 1; // changed
|
||||
o->select_toggle(); // toggle selection
|
||||
lastselect = o; // save we toggled it (prevents oscillation)
|
||||
redraw(); // make change(s) visible
|
||||
}
|
||||
} else {
|
||||
changed = 1; // changed
|
||||
o->select(); // select this
|
||||
redraw(); // make change(s) visible
|
||||
if ( ! o->is_selected() ) {
|
||||
changed = 1; // changed
|
||||
o->select(); // select this
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -323,11 +323,17 @@ int Fl_Tree::handle(int e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case FL_RELEASE: {
|
||||
if ( Fl::event_button() == FL_LEFT_MOUSE ) {
|
||||
ret |= 1;
|
||||
}
|
||||
if ( when() & FL_WHEN_RELEASE ||
|
||||
( changed && when() & FL_WHEN_CHANGED) ) {
|
||||
set_changed();
|
||||
do_callback((Fl_Widget*)this, user_data()); // item callback
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user