Small mod to spreadsheet example (single click cells)

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7995 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Greg Ercolano 2010-12-10 07:52:05 +00:00
parent 7457f0dcaf
commit ca8f6d72b6

View File

@ -209,13 +209,9 @@ void Spreadsheet::event_callback2() {
case CONTEXT_CELL: { // A table event occurred on a cell
switch (Fl::event()) { // see what FLTK event caused it
case FL_PUSH: // mouse click?
if (!Fl::event_clicks()) { // single click?
done_editing(); // finish editing
} else {
Fl::event_clicks(0); // double click? zero clicks, fallthrough
done_editing(); // finish editing previous
if (R != rows()-1 && C != cols()-1 ) // only edit cells not in total's columns
start_editing(R,C); // start new edit
}
return;
case FL_KEYBOARD: {