src/ldDocument.cc

changeset 744
bbe0e1834065
parent 739
152b33a6d51b
child 746
893c43b337dd
--- a/src/ldDocument.cc	Mon Apr 28 17:30:20 2014 +0300
+++ b/src/ldDocument.cc	Mon Apr 28 17:34:10 2014 +0300
@@ -543,8 +543,7 @@
 	// If we have unsaved changes, warn and give the option of saving.
 	if (hasUnsavedChanges())
 	{
-		String message = format (tr ("There are unsaved changes to %1. Should it be saved?"),
-			(name().length() > 0) ? name() : tr ("<anonymous>"));
+		String message = format (tr ("There are unsaved changes to %1. Should it be saved?"), getDisplayName());
 
 		int button = msgbox::question (g_win, tr ("Unsaved Changes"), message,
 			(msgbox::Yes | msgbox::No | msgbox::Cancel), msgbox::Cancel);
@@ -576,7 +575,8 @@
 						return false;
 					}
 				}
-			} break;
+				break;
+			}
 
 			case msgbox::Cancel:
 				return false;

mercurial