summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 08:28:59 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2002-05-01 08:28:59 +0000
commit43b4048b9c613e23ce80e2ce9c96cf30334fe931 (patch)
tree3b9cf150b98313f4effd8723a6d48b4ebad6ec70 /src/Fl_File_Chooser2.cxx
parente5ceaa48e4db781002fc1ff66febf9fd11de95b9 (diff)
Fix file chooser bug - show() was calling deselect() when it shouldn't
have been. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2153 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index a1093bf4a..e696837a4 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.8 2002/04/30 21:50:16 easysw Exp $"
+// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.9 2002/05/01 08:28:59 easysw Exp $"
//
// More Fl_File_Chooser routines.
//
@@ -656,14 +656,13 @@ Fl_File_Chooser::fileNameCB()
}
}
- fileList->deselect(0);
- fileList->redraw();
-
// If we have any matches, add them to the input field...
if (first_line > 0 && min_match == max_match &&
max_match == (int)strlen(fileList->text(first_line))) {
// This is the only possible match...
+ fileList->deselect(0);
fileList->select(first_line);
+ fileList->redraw();
}
else if (max_match > min_match && max_match != 100000)
{
@@ -683,6 +682,10 @@ Fl_File_Chooser::fileNameCB()
fileName->position(filename - pathname + max_match,
filename - pathname + min_match);
}
+ else if (max_match == 0) {
+ fileList->deselect(0);
+ fileList->redraw();
+ }
// See if we need to enable the OK button...
if ((type_ & CREATE || access(fileName->value(), 0) == 0) &&
@@ -695,5 +698,5 @@ Fl_File_Chooser::fileNameCB()
//
-// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.8 2002/04/30 21:50:16 easysw Exp $".
+// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.9 2002/05/01 08:28:59 easysw Exp $".
//