Skip to content

Commit 70e578c

Browse files
committed
Fixed bug where custom title disappears on world save
1 parent 1a731fc commit 70e578c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5770,6 +5770,7 @@ void CMUSHclientDoc::OnFileSave()
57705770
{
57715771
int iCount;
57725772
CString strDirectory;
5773+
CString strOriginalTitle = m_strWindowTitle;
57735774

57745775
// find length of current directory
57755776
iCount = GetCurrentDirectory (0, NULL);
@@ -5782,6 +5783,8 @@ CString strDirectory;
57825783
CDocument::OnFileSave ();
57835784
// change back to current directory
57845785
SetCurrentDirectory (strDirectory);
5786+
// put title back
5787+
SetTitle (strOriginalTitle);
57855788
}
57865789

57875790
void CMUSHclientDoc::OnUpdateFileSave(CCmdUI* pCmdUI)
@@ -5796,6 +5799,7 @@ void CMUSHclientDoc::OnFileSaveAs()
57965799
{
57975800
int iCount;
57985801
CString strDirectory;
5802+
CString strOriginalTitle = m_strWindowTitle;
57995803

58005804
// find length of current directory
58015805
iCount = GetCurrentDirectory (0, NULL);
@@ -5808,7 +5812,8 @@ CString strDirectory;
58085812
CDocument::OnFileSaveAs ();
58095813
// change back to current directory
58105814
SetCurrentDirectory (strDirectory);
5811-
5815+
// put title back
5816+
SetTitle (strOriginalTitle);
58125817
}
58135818

58145819
void CMUSHclientDoc::OnUpdateFileSaveAs(CCmdUI* pCmdUI)

0 commit comments

Comments
 (0)