]> Creatis software - bbtkGEditor.git/commitdiff
Bug #1878
authorDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 2 Jan 2013 13:01:49 +0000 (14:01 +0100)
committerDaniel Gonzalez <daniel.gonzalez@creatis.insa-lyon.fr>
Wed, 2 Jan 2013 13:01:49 +0000 (14:01 +0100)
Plug package doesn't work with new Creatis Copyright headers

Now skipping comments before reading packages

lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx

index ca7bb43a364a791e5c626c73cc711543c96bb975..93596627446f3930b78bfa3236751bb5df35d858 100644 (file)
@@ -1164,7 +1164,12 @@ void wxGUIEditorGraphicBBS::OnPlugPackage(wxCommandEvent& event)
                if(userResponse==wxID_OK)
                {
                        std::string path = wx2std (FD->GetPath()) ;
+                       #ifdef WIN32
+                       std::string fname = path + "\\bbtkPackage";
+                       #else
                        std::string fname = path + "/bbtkPackage";
+                       #endif
+                       
                        std::cout << "Path chosen = \"" << FD->GetPath() << "\"" << std::endl;
                        if ( Utilities::FileExists( fname ) )
                        {
@@ -1172,6 +1177,11 @@ void wxGUIEditorGraphicBBS::OnPlugPackage(wxCommandEvent& event)
                                f.open(fname.c_str());
                                std::string pname;
                                f >> pname;
+                               while(pname[0] == '#')
+                               {
+                                       getline(f, pname, '\n');
+                                       f >> pname;
+                               }
                                f.close();
 
                                bbtk::ConfigurationFile::GetInstance().AddPackagePathsAndWrite( path );