src/history.cpp

changeset 275
7b5afec27688
parent 274
d232fe4d88a6
child 276
a21e49914264
equal deleted inserted replaced
274:d232fe4d88a6 275:7b5afec27688
136 f->forgetObject (obj); 136 f->forgetObject (obj);
137 delete obj; 137 delete obj;
138 } 138 }
139 139
140 DelHistory::~DelHistory () {} 140 DelHistory::~DelHistory () {}
141
142 // =============================================================================
143 void EditHistory::undo () const {
144 LDObject* obj = g_curfile->object (index ());
145 LDObject* newobj = parseLine (oldCode ());
146 obj->replace (newobj);
147 g_win->R ()->compileObject (newobj);
148 }
149
150 void EditHistory::redo () const {
151 LDObject* obj = g_curfile->object (index ());
152 LDObject* newobj = parseLine (newCode ());
153 obj->replace (newobj);
154 g_win->R ()->compileObject (newobj);
155 }
156
157 EditHistory::~EditHistory () {}

mercurial