X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcreaDevManagerLib%2FwxCDMMainFrame.cpp;fp=lib%2FcreaDevManagerLib%2FwxCDMMainFrame.cpp;h=e8d28c522ca75ef4c83c79f96b1cfca297dc5da6;hb=4790438d1d66a44ff16b2a8689882460bb85312c;hp=6ef4155e2243cd2615bb1ceac5385b89985559e7;hpb=76962b2ed3513cee0f6afd83b9d93e2b43bdefc5;p=crea.git diff --git a/lib/creaDevManagerLib/wxCDMMainFrame.cpp b/lib/creaDevManagerLib/wxCDMMainFrame.cpp index 6ef4155..e8d28c5 100755 --- a/lib/creaDevManagerLib/wxCDMMainFrame.cpp +++ b/lib/creaDevManagerLib/wxCDMMainFrame.cpp @@ -51,6 +51,7 @@ #include "wxCDMLibraryDescriptionPanel.h" #include "wxCDMPackageDescriptionPanel.h" #include "wxCDMBlackBoxDescriptionPanel.h" +#include "wxCDMBBSFileDescriptionPanel.h" #include "wxCDMCodeFileDescriptionPanel.h" #include "wxCDMCMakeListsDescriptionPanel.h" #include "wxCDMFolderDescriptionPanel.h" @@ -1022,14 +1023,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) } else { - //folder - modelCDMFolder* elementFolder = dynamic_cast(element); - if(elementFolder != NULL) + //BBSFile + modelCDMBBSFile* elementBBSFile = dynamic_cast(element); + if(elementBBSFile != NULL) { //create element description - description = new wxCDMFolderDescriptionPanel( + description = new wxCDMBBSFileDescriptionPanel( this, - elementFolder, + elementBBSFile, ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, @@ -1039,14 +1040,14 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) } else { - //file - modelCDMFile* elementFile = dynamic_cast(element); - if(elementFile != NULL) + //folder + modelCDMFolder* elementFolder = dynamic_cast(element); + if(elementFolder != NULL) { //create element description - description = new wxCDMFileDescriptionPanel( + description = new wxCDMFolderDescriptionPanel( this, - elementFile, + elementFolder, ID_WINDOW_PROPERTIES, wxT("Description Panel"), wxDefaultPosition, @@ -1056,17 +1057,35 @@ void wxCDMMainFrame::OnTreeSelectionChanged(wxTreeEvent& event) } else { - - //main if not any - //create element description - description = new wxCDMMainDescriptionPanel( - this, - ID_WINDOW_PROPERTIES, - wxT("Description Panel"), - wxDefaultPosition, - wxSize(600, 400), - 0 - ); + //file + modelCDMFile* elementFile = dynamic_cast(element); + if(elementFile != NULL) + { + //create element description + description = new wxCDMFileDescriptionPanel( + this, + elementFile, + ID_WINDOW_PROPERTIES, + wxT("Description Panel"), + wxDefaultPosition, + wxSize(600, 400), + 0 + ); + } + else + { + + //main if not any + //create element description + description = new wxCDMMainDescriptionPanel( + this, + ID_WINDOW_PROPERTIES, + wxT("Description Panel"), + wxDefaultPosition, + wxSize(600, 400), + 0 + ); + } } } }