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 () {} |