76 // ============================================================================= |
76 // ============================================================================= |
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
77 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |
78 // ============================================================================= |
78 // ============================================================================= |
79 void DeleteHistory::undo () { |
79 void DeleteHistory::undo () { |
80 for (ulong i = 0; i < cache.size(); ++i) { |
80 for (ulong i = 0; i < cache.size(); ++i) { |
81 LDObject* obj = cache[i]->clone (); |
81 ulong idx = cache.size() - i - 1; |
82 g_CurrentFile->objects.insert (g_CurrentFile->objects.begin() + indices[i], obj); |
82 LDObject* obj = cache[idx]->clone (); |
|
83 g_CurrentFile->objects.insert (g_CurrentFile->objects.begin() + indices[idx], obj); |
83 } |
84 } |
84 |
85 |
85 g_ForgeWindow->refresh (); |
86 g_ForgeWindow->refresh (); |
86 } |
87 } |
87 |
88 |