--- a/src/gui.cpp Tue May 28 18:30:40 2013 +0300 +++ b/src/gui.cpp Sat Jun 01 03:17:52 2013 +0300 @@ -134,7 +134,7 @@ // things not implemented yet findAction ("help")->setEnabled (false); - History::updateActions (); + g_curfile->history ().updateActions (); } // ============================================================================= @@ -518,7 +518,7 @@ title += fmt (": %s", comm->text.chars()); } - if (History::pos () != g_curfile->savePos ()) + if (g_curfile->history ().pos () != g_curfile->savePos ()) title += '*'; } @@ -782,21 +782,15 @@ if (col == null) return; - vector<ulong> indices; - vector<short> colors; short newColor = col->index; for (LDObject* obj : m_sel) { if (obj->color == -1) continue; // uncolored object - indices << obj->getIndex (g_curfile); - colors << obj->color; - obj->color = newColor; } - History::addEntry (new SetColorHistory (indices, colors, newColor)); fullRefresh (); } @@ -950,20 +944,11 @@ // ======================================================================================================================================== DelHistory* ForgeWindow::deleteObjVector (vector<LDObject*> objs) { - vector<ulong> indices; - vector<LDObject*> cache; - for (LDObject* obj : objs) { - indices << obj->getIndex (g_curfile); - cache << obj->clone (); - g_curfile->forgetObject (obj); delete obj; } - if (indices.size () > 0) - return new DelHistory (indices, cache); - return null; }