From 9b50453dd44ee2b9b94d1f81035bdd2c9850db19 Mon Sep 17 00:00:00 2001 From: Frederic Cervenansky Date: Tue, 28 Apr 2009 12:59:58 +0000 Subject: [PATCH] AddFile et AddDir not only on local database. --- src2/creaImageIOWxGimmickView.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) 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(); -- 2.47.1