Loading kicad/mainframe.cpp +9 −6 Original line number Original line Diff line number Diff line Loading @@ -127,16 +127,19 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) { { m_project_file_name = aFullProjectProFileName; // ensure file name is absolute: wxFileName fn( aFullProjectProFileName ); wxASSERT( wxFileName( m_project_file_name ).IsAbsolute() || if( !fn.IsAbsolute() ) wxFileName( m_project_file_name ).GetName() == NAMELESS_PROJECT wxT( ".pro" ) ); fn.MakeAbsolute(); Prj().SetProjectFullName( fn.GetFullPath() ); } } const wxString KICAD_MANAGER_FRAME::GetProjectFileName() const wxString KICAD_MANAGER_FRAME::GetProjectFileName() { { return m_project_file_name; return Prj().GetProjectFullName(); } } Loading Loading @@ -287,7 +290,7 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) { { wxFileName fn( m_project_file_name ); wxFileName fn( GetProjectFileName() ); fn.SetExt( SchematicFileExtension ); fn.SetExt( SchematicFileExtension ); Loading Loading @@ -339,7 +342,7 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) { { wxFileName fn( m_project_file_name ); wxFileName fn( GetProjectFileName() ); fn.SetExt( NetlistFileExtension ); fn.SetExt( NetlistFileExtension ); Loading kicad/prjconfig.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -182,8 +182,6 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { { wxString title; wxString title; // this is still a pr, will work on it tomorrow. ClearMsg(); ClearMsg(); if( event.GetId() != wxID_ANY ) if( event.GetId() != wxID_ANY ) Loading @@ -210,8 +208,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL ) return; return; DBG( printf( "%s: wxFileDialog::GetPath=%s\n", __func__, TO_UTF8( dlg.GetPath() ) );) wxFileName pro( dlg.GetPath() ); wxFileName pro( dlg.GetPath() ); if( !pro.IsAbsolute() ) pro.MakeAbsolute(); pro.SetExt( ProjectFileExtension ); pro.SetExt( ProjectFileExtension ); if( newProject ) if( newProject ) Loading Loading
kicad/mainframe.cpp +9 −6 Original line number Original line Diff line number Diff line Loading @@ -127,16 +127,19 @@ wxConfigBase* KICAD_MANAGER_FRAME::config() void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFileName ) { { m_project_file_name = aFullProjectProFileName; // ensure file name is absolute: wxFileName fn( aFullProjectProFileName ); wxASSERT( wxFileName( m_project_file_name ).IsAbsolute() || if( !fn.IsAbsolute() ) wxFileName( m_project_file_name ).GetName() == NAMELESS_PROJECT wxT( ".pro" ) ); fn.MakeAbsolute(); Prj().SetProjectFullName( fn.GetFullPath() ); } } const wxString KICAD_MANAGER_FRAME::GetProjectFileName() const wxString KICAD_MANAGER_FRAME::GetProjectFileName() { { return m_project_file_name; return Prj().GetProjectFullName(); } } Loading Loading @@ -287,7 +290,7 @@ void KICAD_MANAGER_FRAME::RunEeschema( const wxString& aProjectSchematicFileName void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunEeschema( wxCommandEvent& event ) { { wxFileName fn( m_project_file_name ); wxFileName fn( GetProjectFileName() ); fn.SetExt( SchematicFileExtension ); fn.SetExt( SchematicFileExtension ); Loading Loading @@ -339,7 +342,7 @@ void KICAD_MANAGER_FRAME::OnRunPageLayoutEditor( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) void KICAD_MANAGER_FRAME::OnRunCvpcb( wxCommandEvent& event ) { { wxFileName fn( m_project_file_name ); wxFileName fn( GetProjectFileName() ); fn.SetExt( NetlistFileExtension ); fn.SetExt( NetlistFileExtension ); Loading
kicad/prjconfig.cpp +5 −2 Original line number Original line Diff line number Diff line Loading @@ -182,8 +182,6 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) { { wxString title; wxString title; // this is still a pr, will work on it tomorrow. ClearMsg(); ClearMsg(); if( event.GetId() != wxID_ANY ) if( event.GetId() != wxID_ANY ) Loading @@ -210,8 +208,13 @@ void KICAD_MANAGER_FRAME::OnLoadProject( wxCommandEvent& event ) if( dlg.ShowModal() == wxID_CANCEL ) if( dlg.ShowModal() == wxID_CANCEL ) return; return; DBG( printf( "%s: wxFileDialog::GetPath=%s\n", __func__, TO_UTF8( dlg.GetPath() ) );) wxFileName pro( dlg.GetPath() ); wxFileName pro( dlg.GetPath() ); if( !pro.IsAbsolute() ) pro.MakeAbsolute(); pro.SetExt( ProjectFileExtension ); pro.SetExt( ProjectFileExtension ); if( newProject ) if( newProject ) Loading