From a841de469c071cfdccb8ac00003584c95a2a4f2e Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Mon, 26 May 2003 01:39:53 +0000 Subject: [PATCH] Fix STR 27 - double-click in file chooser followed by single click was treated as another double-click (actually triple click, but the effect was the same...) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2998 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 5 +++++ src/Fl_File_Chooser2.cxx | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 4e0c4dbaf..c6be61f4e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,10 @@ CHANGES IN FLTK 1.1.4 + - The file chooser did not reset the click count when + changing directories; if you clicked on a file in the + same position after changing directories with a + double- click, the chooser treated it as a triple + click (STR #27) - Symbols with outlines did not get drawn inactive. - The Fl_Help_View widget now provides a find() method to search for text within the page. diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 73f9a76fd..914f72809 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.30 2003/01/30 21:41:42 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.31 2003/05/26 01:39:53 easysw Exp $" // // More Fl_File_Chooser routines. // @@ -403,6 +403,12 @@ Fl_File_Chooser::fileListCB() { // Change directories... directory(pathname); + + // Reset the click count so that a click in the same spot won't + // be treated as a triple-click. We use a value of -1 because + // the next click will increment click count to 0, which is what + // we really want... + Fl::event_clicks(-1); } else { @@ -1159,5 +1165,5 @@ unquote_pathname(char *dst, // O - Destination string // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.30 2003/01/30 21:41:42 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.31 2003/05/26 01:39:53 easysw Exp $". //