src/mainWindow.cc

changeset 744
bbe0e1834065
parent 739
152b33a6d51b
child 745
ab8adddc0f5c
--- a/src/mainWindow.cc	Mon Apr 28 17:30:20 2014 +0300
+++ b/src/mainWindow.cc	Mon Apr 28 17:34:10 2014 +0300
@@ -260,13 +260,11 @@
 	// Append our current file if we have one
 	if (getCurrentDocument())
 	{
-		if (getCurrentDocument()->name().length() > 0)
-			title += format (": %1", basename (getCurrentDocument()->name()));
-		else
-			title += format (": <anonymous>");
+		title += ": ";
+		title += getCurrentDocument()->getDisplayName();
 
 		if (getCurrentDocument()->getObjectCount() > 0 &&
-				getCurrentDocument()->getObject (0)->type() == LDObject::EComment)
+			getCurrentDocument()->getObject (0)->type() == LDObject::EComment)
 		{
 			// Append title
 			LDComment* comm = static_cast<LDComment*> (getCurrentDocument()->getObject (0));

mercurial