140 SetColorHistory::~SetColorHistory () {} |
140 SetColorHistory::~SetColorHistory () {} |
141 |
141 |
142 // ============================================================================= |
142 // ============================================================================= |
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
143 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
144 // ============================================================================= |
144 // ============================================================================= |
145 void SetContentsHistory::undo () { |
145 void EditHistory::undo () { |
146 LDObject* obj = g_CurrentFile->objects[ulIndex]; |
146 for (ulong idx : ulaIndices) { |
147 obj->replace (oldObj->clone ()); |
147 LDObject* obj = g_CurrentFile->objects[idx]; |
148 g_ForgeWindow->refresh (); |
148 obj->replace (paOldObjs[idx]->clone ()); |
149 } |
149 } |
150 |
150 |
151 void SetContentsHistory::redo () { |
151 g_ForgeWindow->refresh (); |
152 LDObject* obj = g_CurrentFile->objects[ulIndex]; |
152 } |
153 obj->replace (newObj->clone ()); |
153 |
154 g_ForgeWindow->refresh (); |
154 void EditHistory::redo () { |
155 } |
155 for (ulong idx : ulaIndices) { |
156 |
156 LDObject* obj = g_CurrentFile->objects[idx]; |
157 SetContentsHistory::~SetContentsHistory () { |
157 obj->replace (paNewObjs[idx]->clone ()); |
158 delete oldObj; |
158 } |
159 delete newObj; |
159 |
|
160 g_ForgeWindow->refresh (); |
|
161 } |
|
162 |
|
163 EditHistory::~EditHistory () { |
|
164 for (ulong idx : ulaIndices) { |
|
165 delete paOldObjs[idx]; |
|
166 delete paNewObjs[idx]; |
|
167 } |
160 } |
168 } |
161 |
169 |
162 // ============================================================================= |
170 // ============================================================================= |
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
164 // ============================================================================= |
172 // ============================================================================= |