From cff6fb4256e7262ba0a6231f0b0ca34121949d2c Mon Sep 17 00:00:00 2001 From: "Zane U. Ji" Date: Mon, 24 Mar 2014 20:03:32 +0800 Subject: [PATCH] Updated title when the file name changed --- src/xmlcopyeditor.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/xmlcopyeditor.cpp b/src/xmlcopyeditor.cpp index 09890fb..08e3cea 100644 --- a/src/xmlcopyeditor.cpp +++ b/src/xmlcopyeditor.cpp @@ -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 )