diff --git a/eeschema/sch_edit_frame.cpp b/eeschema/sch_edit_frame.cpp index 12640a0238..fa5a4c3154 100644 --- a/eeschema/sch_edit_frame.cpp +++ b/eeschema/sch_edit_frame.cpp @@ -796,6 +796,9 @@ void SCH_EDIT_FRAME::OnModify() GetCanvas()->Refresh(); UpdateHierarchyNavigator(); + + if( !GetTitle().StartsWith( "*" ) ) + UpdateTitle(); } @@ -1254,8 +1257,8 @@ void SCH_EDIT_FRAME::UpdateTitle() unsaved = true; title.Printf( wxT( "%s%s [%s] %s%s\u2014 " ) + _( "Schematic Editor" ), - fn.GetName(), IsContentModified() ? "*" : "", + fn.GetName(), GetCurrentSheet().PathHumanReadable( false ), readOnly ? _( "[Read Only]" ) + wxS( " " ) : "", unsaved ? _( "[Unsaved]" ) + wxS( " " ) : "" ); diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 5f29b04d27..0e14ce07ac 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -781,6 +781,9 @@ void SYMBOL_EDIT_FRAME::OnModify() storeCurrentPart(); m_treePane->GetLibTree()->RefreshLibTree(); + + if( !GetTitle().StartsWith( "*" ) ) + UpdateTitle(); } diff --git a/eeschema/symbol_editor/symbol_editor.cpp b/eeschema/symbol_editor/symbol_editor.cpp index 9efe056648..ae993049a4 100644 --- a/eeschema/symbol_editor/symbol_editor.cpp +++ b/eeschema/symbol_editor/symbol_editor.cpp @@ -138,8 +138,8 @@ void SYMBOL_EDIT_FRAME::updateTitle() if( IsSymbolFromSchematic() ) { title = wxString::Format( _( "%s%s [from schematic]" ) + wxT( " \u2014 " ), - m_reference, - IsContentModified() ? "*" : "" ); + GetScreen() && GetScreen()->IsModify() ? "*" : "", + m_reference ); } else { @@ -148,8 +148,8 @@ void SYMBOL_EDIT_FRAME::updateTitle() bool readOnly = m_libMgr && m_libMgr->IsLibraryReadOnly( GetCurLib() ); title = wxString::Format( wxT( "%s%s %s\u2014 " ), + GetScreen() && GetScreen()->IsModify() ? "*" : "", GetCurPart()->GetLibId().Format().c_str(), - IsContentModified() ? "*" : "", readOnly ? _( "[Read Only Library]" ) + wxT( " " ) : "" ); } } diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp index 04ea82485b..6ca1d924f4 100644 --- a/pcbnew/footprint_edit_frame.cpp +++ b/pcbnew/footprint_edit_frame.cpp @@ -735,6 +735,9 @@ void FOOTPRINT_EDIT_FRAME::OnModify() PCB_BASE_FRAME::OnModify(); Update3DView( true ); m_treePane->GetLibTree()->RefreshLibTree(); + + if( !GetTitle().StartsWith( "*" ) ) + UpdateTitle(); } @@ -748,8 +751,8 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() if( IsCurrentFPFromBoard() ) { title = wxString::Format( _( "%s%s [from %s.%s]" ) + wxT( " \u2014 " ), - footprint->GetReference(), IsContentModified() ? "*" : "", + footprint->GetReference(), Prj().GetProjectName(), PcbFileExtension ); } @@ -766,16 +769,16 @@ void FOOTPRINT_EDIT_FRAME::updateTitle() // Note: don't used GetLoadedFPID(); footprint name may have been edited title += wxString::Format( wxT( "%s%s %s\u2014 " ), - FROM_UTF8( footprint->GetFPID().Format().c_str() ), IsContentModified() ? "*" : "", + FROM_UTF8( footprint->GetFPID().Format().c_str() ), writable ? "" : _( "[Read Only]" ) + wxS( " " ) ); } else if( !fpid.GetLibItemName().empty() ) { // Note: don't used GetLoadedFPID(); footprint name may have been edited title += wxString::Format( wxT( "%s%s %s \u2014 " ), - FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() ), IsContentModified() ? "*" : "", + FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() ), _( "[Unsaved]" ) ); } diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index 6a74743c60..ce0239d6d2 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -1169,6 +1169,9 @@ void PCB_EDIT_FRAME::OnModify( ) Update3DView( true ); + if( !GetTitle().StartsWith( "*" ) ) + UpdateTitle(); + m_ZoneFillsDirty = true; } @@ -1191,8 +1194,8 @@ void PCB_EDIT_FRAME::UpdateTitle() unsaved = true; SetTitle( wxString::Format( wxT( "%s%s %s%s\u2014 " ) + _( "PCB Editor" ), - fn.GetName(), IsContentModified() ? "*" : "", + fn.GetName(), readOnly ? _( "[Read Only]" ) + wxS( " " ) : "", unsaved ? _( "[Unsaved]" ) + wxS( " " ) : "" ) ); }