X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src2%2FcreaImageIOWxGimmickView.cpp;h=024bc8c19589838b05252260ae162b0cb466aa01;hb=d29be141890963fdc3236a28c81cd9dce0e19f69;hp=c646456ad61433d540d69eed9b7b2131001e1050;hpb=4e686df72aa8d0c59509195d173fd37acbd636b1;p=creaImageIO.git 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();