src/history.cpp

changeset 190
82f784cf2ce5
parent 188
4e686b771996
child 192
c414924a647c
equal deleted inserted replaced
189:ac2d3e8dd110 190:82f784cf2ce5
163 163
164 g_win->refresh (); 164 g_win->refresh ();
165 } 165 }
166 166
167 void EditHistory::addEntry (LDObject* const oldObj, LDObject* const newObj) { 167 void EditHistory::addEntry (LDObject* const oldObj, LDObject* const newObj) {
168 printf ("%s at %lu, replaced by a %s\n", 168 addEntry (oldObj, newObj, oldObj->getIndex (g_curfile));
169 g_saObjTypeNames[oldObj->getType()], 169 }
170 oldObj->getIndex (g_curfile), 170
171 g_saObjTypeNames[newObj->getType()]); 171 void EditHistory::addEntry (LDObject* const oldObj, LDObject* const newObj, const ulong idx) {
172 172 ulaIndices.push_back (idx);
173 ulaIndices.push_back (oldObj->getIndex (g_curfile));
174 paOldObjs.push_back (oldObj->clone ()); 173 paOldObjs.push_back (oldObj->clone ());
175 paNewObjs.push_back (newObj->clone ()); 174 paNewObjs.push_back (newObj->clone ());
176 } 175 }
177 176
178 EditHistory::~EditHistory () { 177 EditHistory::~EditHistory () {

mercurial