revamped undo system in preparation for marker support

This commit is contained in:
itsmattkc
2018-09-14 00:28:41 +10:00
parent 8b2408d4c1
commit c783a2a1b2
22 changed files with 850 additions and 347 deletions
+3 -8
View File
@@ -622,9 +622,7 @@ void MainWindow::on_actionSlide_Tool_triggered()
}
void MainWindow::on_actionFolder_triggered() {
TimelineAction* ta = new TimelineAction();
ta->add_media(panel_project->new_folder(0), panel_project->get_selected_folder());
undo_stack.push(ta);
undo_stack.push(new AddMediaCommand(panel_project->new_folder(0), panel_project->get_selected_folder()));
}
void MainWindow::fileMenu_About_To_Be_Shown() {
@@ -688,12 +686,9 @@ void MainWindow::on_actionSet_Out_Point_triggered()
if (panel_timeline->focused()) panel_timeline->set_out_point();
}
void MainWindow::on_actionClear_In_Out_triggered()
{
void MainWindow::on_actionClear_In_Out_triggered() {
if (panel_timeline->focused() && sequence->using_workarea) {
TimelineAction* ta = new TimelineAction();
ta->set_in_out(sequence, false, 0, 0);
undo_stack.push(ta);
undo_stack.push(new SetTimelineInOutCommand(sequence, false, 0, 0));
panel_timeline->repaint_timeline();
}
}