src/editHistory.cpp

changeset 1079
67c6e5d32e68
parent 1073
a0a0d581309b
child 1144
4f226fd97826
--- a/src/editHistory.cpp	Sun Jan 29 15:49:36 2017 +0200
+++ b/src/editHistory.cpp	Sun Jan 29 21:02:11 2017 +0200
@@ -171,7 +171,7 @@
 
 void AddHistoryEntry::redo() const
 {
-	parent()->document()->insertObject (m_index, ParseLine (m_code));
+	parent()->document()->insertFromString(m_index, m_code);
 }
 
 //
@@ -203,15 +203,13 @@
 void EditHistoryEntry::undo() const
 {
 	LDObject* object = parent()->document()->getObject (m_index);
-	LDObject* newObject = ParseLine (m_oldCode);
-	parent()->document()->replace(object, newObject);
+	parent()->document()->replaceWithFromString(object, m_oldCode);
 }
 
 void EditHistoryEntry::redo() const
 {
 	LDObject* object = parent()->document()->getObject (m_index);
-	LDObject* newObject = ParseLine (m_newCode);
-	parent()->document()->replace(object, newObject);
+	parent()->document()->replaceWithFromString(object, m_newCode);
 }
 
 //

mercurial