Eeschema: shows the opened sheet info in title bar.

Fixes: lp:1819564
https://bugs.launchpad.net/kicad/+bug/1819564
This commit is contained in:
jean-pierre charras 2019-03-15 13:09:04 +01:00
parent a1ee5405aa
commit bec2d7861e
3 changed files with 10 additions and 6 deletions

View File

@ -375,6 +375,8 @@ bool SCH_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
SyncView();
GetScreen()->ClearDrawingState();
UpdateTitle();
return true;
}

View File

@ -3,7 +3,7 @@
*
* Copyright (C) 2004 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2004-2017 KiCad Developers, see change_log.txt for contributors.
* Copyright (C) 2004-2019 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -301,5 +301,7 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet()
// Some items (wires, labels) can be highlighted. So prepare the highlight flag:
SetCurrentSheetHighlightFlags( nullptr );
UpdateTitle();
GetCanvas()->Refresh();
}

View File

@ -444,6 +444,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ):
Bind( wxEVT_COMMAND_MENU_SELECTED, &SCH_EDIT_FRAME::OnEditSymbolLibTable, this,
ID_EDIT_SYM_LIB_TABLE );
UpdateTitle();
}
@ -1478,7 +1480,7 @@ void SCH_EDIT_FRAME::UpdateTitle()
if( GetScreen()->GetFileName() == m_DefaultSchematicFileName )
{
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s" ), GetChars( GetScreen()->GetFileName() ) );
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s" ), GetScreen()->GetFileName() );
}
else
{
@ -1486,9 +1488,8 @@ void SCH_EDIT_FRAME::UpdateTitle()
wxFileName fn = fileName;
title.Printf( _( "Eeschema" ) + wxT( " \u2014 %s [%s] \u2014 %s" ),
GetChars( fn.GetName() ),
GetChars( m_CurrentSheet->PathHumanReadable() ),
GetChars( fn.GetPath() ) );
fn.GetFullName(), m_CurrentSheet->PathHumanReadable(),
fn.GetPath() );
if( fn.FileExists() )
{
@ -1560,4 +1561,3 @@ const BOX2I SCH_EDIT_FRAME::GetDocumentExtents() const
return BOX2I( VECTOR2I(0, 0), VECTOR2I( sizeX, sizeY ) );
}