/*
* CINELERRA
* Copyright (C) 1997-2011 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#include "asset.h"
#include "undostack.h"
MainUndo::MainUndo(MWindow *mwindow)
-{
+{
this->mwindow = mwindow;
undo_stack = new UndoStack;
last_update = new Timer;
}
-void MainUndo::update_undo_entry(const char *description,
+void MainUndo::update_undo_entry(const char *description,
uint32_t load_flags,
- void *creator,
+ void *creator,
int changes_made)
{
FileXML file;
- mwindow->edl->save_xml(&file,
+ mwindow->edl->save_xml(&file,
"",
0,
0);
update_undo_entry("", 0, creator, 0);
}
-void MainUndo::update_undo_after(const char *description,
+void MainUndo::update_undo_after(const char *description,
uint32_t load_flags,
int changes_made)
{
{
undo_stack->current = current;
// Set the redo text to the current description
- if(mwindow->gui)
+ if(mwindow->gui)
mwindow->gui->mainmenu->redo->update_caption(
after_description);
delete [] current_data;
// move current entry back one step
- undo_stack->pull();
+ undo_stack->pull();
if(mwindow->gui)
//dump();
reset_creators();
+ mwindow->reset_caches();
return 0;
}
mwindow->gui->mainmenu->undo->update_caption(current->get_description());
// Get next after entry
- current = NEXT;
+ current = NEXT;
if(current)
current = NEXT;
}
}
reset_creators();
+ mwindow->reset_caches();
//dump();
return 0;
}
-// Here the master EDL loads
+// Here the master EDL loads
int MainUndo::load_from_undo(FileXML *file, uint32_t load_flags)
{
mwindow->edl->load_xml(file, load_flags);
{
mwindow->mainindexes->add_next_asset(0, asset);
}
-
+
for(int i = 0; i < mwindow->edl->nested_edls->size(); i++)
{
EDL *nested_edl = mwindow->edl->nested_edls->get(i);
mwindow->mainindexes->add_next_asset(0, nested_edl);
}
mwindow->mainindexes->start_build();
+ mwindow->update_plugin_guis(1);
return 0;
}