Updated title when the file name changed

This commit is contained in:
Zane U. Ji 2014-03-24 20:03:32 +08:00
parent 9826820285
commit cff6fb4256
1 changed files with 8 additions and 4 deletions

View File

@ -3617,10 +3617,14 @@ void MyFrame::saveAs()
history.AddFileToHistory ( path ); // update history history.AddFileToHistory ( path ); // update history
updateFileMenu(); updateFileMenu();
int selection; int selection = mainBook->GetSelection();
if ( ( selection = mainBook->GetSelection() ) == -1 ) if ( selection != -1 )
return; mainBook->SetPageText ( selection, name );
mainBook->SetPageText ( selection, name );
wxString title = showFullPathOnFrame ? path : name;
title += _T ( " - " );
title += _ ( "XML Copy Editor" );
SetTitle ( title );
} }
void MyFrame::OnUpdateCloseAll ( wxUpdateUIEvent& event ) void MyFrame::OnUpdateCloseAll ( wxUpdateUIEvent& event )