KiCad: Update window title after importing Eagle project

This commit is contained in:
Jon Evans 2019-05-27 19:59:48 -04:00
parent 59b729c731
commit f2d7bb7b0c
2 changed files with 9 additions and 9 deletions

View File

@ -137,6 +137,14 @@ void KICAD_MANAGER_FRAME::SetProjectFileName( const wxString& aFullProjectProFil
fn.MakeAbsolute();
Prj().SetProjectFullName( fn.GetFullPath() );
SetTitle( wxString( "KiCad " ) + GetBuildVersion() );
wxString title = GetTitle() + " " + fn.GetFullPath();
if( !fn.IsDirWritable() )
title += _( " [Read Only]" );
SetTitle( title );
}

View File

@ -71,8 +71,6 @@ void KICAD_MANAGER_FRAME::LoadProject( const wxFileName& aProjectFileName )
if( !Kiway().PlayersClose( false ) )
return;
SetTitle( wxString( "KiCad " ) + GetBuildVersion() );
// Save the project file for the currently loaded project.
if( m_active_project )
Prj().ConfigLoad( PgmTop().SysSearch(), GeneralGroupName, s_KicadManagerParams );
@ -82,15 +80,9 @@ void KICAD_MANAGER_FRAME::LoadProject( const wxFileName& aProjectFileName )
SetProjectFileName( aProjectFileName.GetFullPath() );
Prj().ConfigLoad( PgmTop().SysSearch(), GeneralGroupName, s_KicadManagerParams );
wxString title = GetTitle() + " " + aProjectFileName.GetFullPath();
if( !aProjectFileName.IsDirWritable() )
title += _( " [Read Only]" );
else
if( aProjectFileName.IsDirWritable() )
SetMruPath( Prj().GetProjectPath() ); // Only set MRU path if we have write access. Why?
SetTitle( title );
UpdateFileHistory( aProjectFileName.GetFullPath(), &PgmTop().GetFileHistory() );
m_LeftWin->ReCreateTreePrj();