]> Creatis software - bbtk.git/commitdiff
#2816 BBTK Bug New Normal - std FilesFromDirectory box not clean the list for the...
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Feb 2016 10:03:41 +0000 (11:03 +0100)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Feb 2016 10:03:41 +0000 (11:03 +0100)
packages/std/src/bbstdFilesFromDirectory.cxx
packages/wx/src/bbwxComboBox.cxx

index b40f1fb34f09ad00bb27248060950fab0629a295..fc271c23591dd14977a420714323bd855561b9d4 100644 (file)
@@ -100,6 +100,7 @@ std::string FilesFromDirectory::NormalizePath(std::string const &pathname)
  */
 int FilesFromDirectory::Explore(std::string const &dirpath, bool recursive)
 {
+   Filenames.clear();
    int numberOfFiles = 0;
    std::string fileName;
    std::string dirName = NormalizePath(dirpath);
index 234a0e6c2444949c38f7fa14a22ec1b3207661f0..e270639d7a97aa118eccdb02d46461f9590fde93 100644 (file)
@@ -142,10 +142,12 @@ namespace bbwx
                if (mTypeForm==1)
                {
                        wxlistbox->Clear();
+
                for (i=0;i<lstIn.size(); i++)
                {
                                wxlistbox->Append(  bbtk::std2wx( lstIn[i] )  ); 
                        } // for i
+
                wxlistbox->SetSelection(iSelection);
                } else {
                        wxchoice->Clear();