src/ldDocument.cpp

changeset 1117
efcb47c64a72
parent 1114
ffd49a28f49e
child 1118
3eeb258f1fb9
--- a/src/ldDocument.cpp	Thu Feb 09 21:04:33 2017 +0200
+++ b/src/ldDocument.cpp	Thu Feb 09 22:46:37 2017 +0200
@@ -25,6 +25,7 @@
 #include "documentloader.h"
 #include "dialogs/openprogressdialog.h"
 #include "documentmanager.h"
+#include "linetypes/comment.h"
 
 LDDocument::LDDocument (DocumentManager* parent) :
     Model {parent},
@@ -308,7 +309,7 @@
 void LDDocument::objectChanged(int position, QString before, QString after)
 {
 	LDObject* object = static_cast<LDObject*>(sender());
-	addToHistory(new EditHistoryEntry {position, before, after});
+	addToHistory(new EditHistoryEntry {object->lineNumber(), before, after});
 	redoVertices();
 	emit objectModified(object);
 }

mercurial