src/mainwindow.cpp

changeset 1306
be85306198a2
parent 1291
9c570a30c98a
child 1318
568fcfc6da71
--- a/src/mainwindow.cpp	Mon Mar 19 12:24:59 2018 +0200
+++ b/src/mainwindow.cpp	Mon Mar 19 12:44:27 2018 +0200
@@ -915,8 +915,9 @@
 	{
 		document->setFrozen(false);
 		print ("Opened %1", document->name());
-		getRendererForDocument(document);
+		Canvas* canvas = getRendererForDocument(document);
 		updateDocumentList();
+		connect(document, &LDDocument::windingChanged, canvas, &Canvas::fullUpdate);
 	}
 }
 
@@ -948,7 +949,7 @@
 		updateTitle();
 		print ("Changed document to %1", document->getDisplayName());
 		ui.objectList->setModel(document);
-		ui.header->setHeader(&document->header);
+		ui.header->setDocument(document);
 		QItemSelectionModel* selection = m_selections.value(document);
 
 		if (selection == nullptr)

mercurial