Loading eeschema/edit_component_in_schematic.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,7 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC return; SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); message = TextField->m_Text; if( Get_Message( _( "Footprint" ), _( "Component footprint" ), message, this ) ) return; // edition cancelled by user. Loading include/wxPcbStruct.h +4 −3 Original line number Diff line number Diff line Loading @@ -496,18 +496,19 @@ public: void OnFileHistory( wxCommandEvent& event ); void Files_io( wxCommandEvent& event ); /** /** Function LoadOnePcbFile * Load a Kicad board (.brd) file. * * @param aFileName - File name including path. If empty, a file dialog will * be displayed. * @param aAppend - Append board file aFileName to the currently loaded file if true. * Default = false. * @param aForceFileDialog - Display the file open dialog even if aFullFileName is * valid if true. * valid if true; Default = false. * * @return False if file load fails or is cancelled by the user, otherwise true. */ bool LoadOnePcbFile( const wxString& aFileName, bool aAppend, bool LoadOnePcbFile( const wxString& aFileName, bool aAppend = false, bool aForceFileDialog = false ); Loading kicad/kicad.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "build_version.h" const wxString g_KicadPrjFilenameExtension(wxT(".pro") ); /* Import functions */ char* GetFileName( char* FullPathName ); Loading kicad/kicad.h +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ #include "wxstruct.h" #include "appl_wxstruct.h" extern const wxString g_KicadPrjFilenameExtension; class RIGHT_KM_FRAME; class TREEPROJECTFILES; class TREE_PROJECT_FRAME; Loading kicad/prjconfig.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName ) wxFileName newProjectName = PrjFullFileName; /* Init default config filename */ filename = wxGetApp().FindLibraryPath( wxT( "kicad.pro" ) ); filename = wxGetApp().FindLibraryPath( wxT( "kicad" ) + g_KicadPrjFilenameExtension); /* Check if file kicad.pro exist in template directory */ if( wxFileName::FileExists( filename ) ) Loading Loading @@ -86,7 +86,16 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event ) m_ProjectFileName = dlg.GetPath(); if( event.GetId() == ID_NEW_PROJECT ) { // Ensure project filename extension is .pro wxString fullname = m_ProjectFileName.GetFullPath(); if ( !fullname.EndsWith( g_KicadPrjFilenameExtension ) ) { fullname += g_KicadPrjFilenameExtension; m_ProjectFileName.SetFullName( fullname ); } CreateNewProject( m_ProjectFileName.GetFullPath() ); } SetLastProject( m_ProjectFileName.GetFullPath() ); } Loading @@ -98,7 +107,7 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event ) wxString filename = m_ProjectFileName.GetFullName(); wxString nameless_prj = NAMELESS_PROJECT; nameless_prj += wxT(".pro"); nameless_prj += g_KicadPrjFilenameExtension; if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(nameless_prj)) { DisplayError( this, _( "Kicad project file <" ) + Loading Loading
eeschema/edit_component_in_schematic.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -369,6 +369,7 @@ void WinEDA_SchematicFrame::EditComponentFootprint( SCH_COMPONENT* Cmp, wxDC* DC return; SCH_FIELD* TextField = Cmp->GetField( FOOTPRINT ); message = TextField->m_Text; if( Get_Message( _( "Footprint" ), _( "Component footprint" ), message, this ) ) return; // edition cancelled by user. Loading
include/wxPcbStruct.h +4 −3 Original line number Diff line number Diff line Loading @@ -496,18 +496,19 @@ public: void OnFileHistory( wxCommandEvent& event ); void Files_io( wxCommandEvent& event ); /** /** Function LoadOnePcbFile * Load a Kicad board (.brd) file. * * @param aFileName - File name including path. If empty, a file dialog will * be displayed. * @param aAppend - Append board file aFileName to the currently loaded file if true. * Default = false. * @param aForceFileDialog - Display the file open dialog even if aFullFileName is * valid if true. * valid if true; Default = false. * * @return False if file load fails or is cancelled by the user, otherwise true. */ bool LoadOnePcbFile( const wxString& aFileName, bool aAppend, bool LoadOnePcbFile( const wxString& aFileName, bool aAppend = false, bool aForceFileDialog = false ); Loading
kicad/kicad.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "build_version.h" const wxString g_KicadPrjFilenameExtension(wxT(".pro") ); /* Import functions */ char* GetFileName( char* FullPathName ); Loading
kicad/kicad.h +2 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ #include "wxstruct.h" #include "appl_wxstruct.h" extern const wxString g_KicadPrjFilenameExtension; class RIGHT_KM_FRAME; class TREEPROJECTFILES; class TREE_PROJECT_FRAME; Loading
kicad/prjconfig.cpp +11 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ void WinEDA_MainFrame::CreateNewProject( const wxString PrjFullFileName ) wxFileName newProjectName = PrjFullFileName; /* Init default config filename */ filename = wxGetApp().FindLibraryPath( wxT( "kicad.pro" ) ); filename = wxGetApp().FindLibraryPath( wxT( "kicad" ) + g_KicadPrjFilenameExtension); /* Check if file kicad.pro exist in template directory */ if( wxFileName::FileExists( filename ) ) Loading Loading @@ -86,7 +86,16 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event ) m_ProjectFileName = dlg.GetPath(); if( event.GetId() == ID_NEW_PROJECT ) { // Ensure project filename extension is .pro wxString fullname = m_ProjectFileName.GetFullPath(); if ( !fullname.EndsWith( g_KicadPrjFilenameExtension ) ) { fullname += g_KicadPrjFilenameExtension; m_ProjectFileName.SetFullName( fullname ); } CreateNewProject( m_ProjectFileName.GetFullPath() ); } SetLastProject( m_ProjectFileName.GetFullPath() ); } Loading @@ -98,7 +107,7 @@ void WinEDA_MainFrame::OnLoadProject( wxCommandEvent& event ) wxString filename = m_ProjectFileName.GetFullName(); wxString nameless_prj = NAMELESS_PROJECT; nameless_prj += wxT(".pro"); nameless_prj += g_KicadPrjFilenameExtension; if( !m_ProjectFileName.FileExists() && !filename.IsSameAs(nameless_prj)) { DisplayError( this, _( "Kicad project file <" ) + Loading