src/editHistory.cpp

changeset 978
4603d8fd063e
parent 968
4b93b7963456
child 981
5d5d84ab2c48
equal deleted inserted replaced
977:dc3ceb65cda7 978:4603d8fd063e
170 170
171 // ============================================================================= 171 // =============================================================================
172 // 172 //
173 void EditHistory::undo() const 173 void EditHistory::undo() const
174 { 174 {
175 LDObject* obj = CurrentDocument()->getObject (index()); 175 LDObject* obj = g_win->currentDocument()->getObject (index());
176 LDObject* newobj = ParseLine (oldCode()); 176 LDObject* newobj = ParseLine (oldCode());
177 obj->replace (newobj); 177 obj->replace (newobj);
178 g_win->R()->compileObject (newobj); 178 g_win->R()->compileObject (newobj);
179 } 179 }
180 180
181 // ============================================================================= 181 // =============================================================================
182 // 182 //
183 void EditHistory::redo() const 183 void EditHistory::redo() const
184 { 184 {
185 LDObject* obj = CurrentDocument()->getObject (index()); 185 LDObject* obj = g_win->currentDocument()->getObject (index());
186 LDObject* newobj = ParseLine (newCode()); 186 LDObject* newobj = ParseLine (newCode());
187 obj->replace (newobj); 187 obj->replace (newobj);
188 g_win->R()->compileObject (newobj); 188 g_win->R()->compileObject (newobj);
189 } 189 }
190 190

mercurial