From: Frederic Cervenansky Date: Tue, 28 Apr 2009 12:59:58 +0000 (+0000) Subject: AddFile et AddDir not only on local database. X-Git-Tag: EED.02Oct2009~88 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9b50453dd44ee2b9b94d1f81035bdd2c9850db19;p=creaImageIO.git AddFile et AddDir not only on local database. --- diff --git a/src2/creaImageIOWxGimmickView.cpp b/src2/creaImageIOWxGimmickView.cpp index c646456..024bc8c 100644 --- a/src2/creaImageIOWxGimmickView.cpp +++ b/src2/creaImageIOWxGimmickView.cpp @@ -220,7 +220,7 @@ namespace creaImageIO // Add Notebook page mNotebook->AddPage( view, crea::std2wx(name) ); - + } //====================================================================== @@ -325,11 +325,11 @@ namespace creaImageIO wxPD_CAN_ABORT ); // TO DO : select the current tree handler - mGimmick->AddFiles("Local database",filenames); + mGimmick->AddFiles(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),filenames); mProgressDialog->Pulse(_T("Updating view...")); - UpdateTreeViewLevel("Local database",1); + UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1); delete mProgressDialog; DisplayAddSummary(); @@ -342,6 +342,7 @@ namespace creaImageIO void WxGimmickView::OnAddDir(wxCommandEvent& event) { mViewer->StopPlayer(); + std::string name = crea::wx2std(mNotebook->GetCurrentPage()->GetName()); long style = wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST; wxDirDialog* FD = new wxDirDialog( 0, @@ -375,13 +376,10 @@ namespace creaImageIO wxPD_CAN_ABORT ); mCurrentDirectory = FD->GetPath(); - - // TO DO : select the current tree handler - mGimmick->AddDir("Local database",dirname,recurse); - + mGimmick->AddDir(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),dirname,recurse); mProgressDialog->Pulse(_T("Updating view...")); - UpdateTreeViewLevel("Local database",1); + UpdateTreeViewLevel(crea::wx2std(mNotebook->GetPageText(mNotebook->GetSelection())),1); delete mProgressDialog; DisplayAddSummary();