src/documentmanager.cpp

changeset 1367
0aab8d972cf6
parent 1332
1fffb24d4ffe
child 1379
35811339ea72
--- a/src/documentmanager.cpp	Sat Mar 31 21:23:22 2018 +0300
+++ b/src/documentmanager.cpp	Sun Apr 01 11:39:07 2018 +0300
@@ -216,15 +216,14 @@
 		if (fileToOverride == nullptr)
 			load = m_window->newDocument(implicit);
 
-		load->setFullPath(path);
-		load->setName(LDDocument::shortenName(path));
-
 		// Loading the file shouldn't count as actual edits to the document.
 		load->history()->setIgnoring (true);
 
 		Parser parser {file};
 		Winding winding = NoWinding;
 		load->header = parser.parseHeader(winding);
+		load->setFullPath(path);
+		load->setName(LDDocument::shortenName(path));
 		load->setWinding(winding);
 		parser.parseBody(*load);
 		file.close();

mercurial