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
updateFileMenu();
int selection;
if ( ( selection = mainBook->GetSelection() ) == -1 )
return;
mainBook->SetPageText ( selection, name );
int selection = mainBook->GetSelection();
if ( selection != -1 )
mainBook->SetPageText ( selection, name );
wxString title = showFullPathOnFrame ? path : name;
title += _T ( " - " );
title += _ ( "XML Copy Editor" );
SetTitle ( title );
}
void MyFrame::OnUpdateCloseAll ( wxUpdateUIEvent& event )