moved undostack to its own source file

This commit is contained in:
itsmattkc
2019-03-14 10:53:50 +11:00
parent c6a4b9e8d6
commit c73fc78087
37 changed files with 212 additions and 172 deletions
+1
View File
@@ -39,6 +39,7 @@
#include "ui/collapsiblewidget.h"
#include "timeline/sequence.h"
#include "undo/undo.h"
#include "undo/undostack.h"
#include "panels/project.h"
#include "panels/timeline.h"
#include "panels/viewer.h"
+6
View File
@@ -25,6 +25,7 @@
#include "rendering/renderfunctions.h"
#include "project/previewgenerator.h"
#include "undo/undo.h"
#include "undo/undostack.h"
#include "ui/mainwindow.h"
#include "global/config.h"
#include "rendering/cacher.h"
@@ -606,7 +607,9 @@ void Project::delete_selected_media() {
// remove
if (remove) {
panel_graph_editor->set_row(nullptr);
panel_effect_controls->Clear(true);
if (olive::ActiveSequence != nullptr) olive::ActiveSequence->selections.clear();
// remove media and parents
@@ -1015,6 +1018,9 @@ void Project::delete_clips_using_selected_media() {
}
void Project::clear() {
// clear graph editor
panel_graph_editor->set_row(nullptr);
// clear effects cache
panel_effect_controls->Clear(true);
+5
View File
@@ -37,6 +37,7 @@
#include "ui/flowlayout.h"
#include "ui/cursors.h"
#include "ui/mainwindow.h"
#include "undo/undostack.h"
#include "global/debug.h"
#include <QTime>
@@ -450,6 +451,7 @@ void Timeline::nest() {
create_ghosts_from_media(olive::ActiveSequence.get(), earliest_point, media_list);
add_clips_from_ghosts(ca, olive::ActiveSequence.get());
panel_graph_editor->set_row(nullptr);
panel_effect_controls->Clear(true);
olive::ActiveSequence->selections.clear();
@@ -680,6 +682,7 @@ void Timeline::toggle_enable_on_selected_clips() {
void Timeline::delete_selection(QVector<Selection>& selections, bool ripple_delete) {
if (selections.size() > 0) {
panel_graph_editor->set_row(nullptr);
panel_effect_controls->Clear(true);
ComboAction* ca = new ComboAction();
@@ -1014,6 +1017,8 @@ bool selection_contains_transition(const Selection& s, Clip* c, int type) {
void Timeline::delete_areas_and_relink(ComboAction* ca, QVector<Selection>& areas, bool deselect_areas) {
clean_up_selections(areas);
panel_graph_editor->set_row(nullptr);
panel_effect_controls->Clear(true);
QVector<int> pre_clips;
+8 -3
View File
@@ -31,6 +31,7 @@
#include "project/footage.h"
#include "project/media.h"
#include "undo/undo.h"
#include "undo/undostack.h"
#include "ui/audiomonitor.h"
#include "rendering/renderfunctions.h"
#include "ui/viewercontainer.h"
@@ -852,9 +853,13 @@ void Viewer::clean_created_seq() {
if (created_sequence) {
// TODO delete undo commands referencing this sequence to avoid crashes
/*for (int i=0;i<undo_stack.count();i++) {
undo_stack.command(i)
}*/
/*
for (int i=0;i<olive::UndoStack.count();i++) {
const QUndoCommand* oa = olive::UndoStack.command(i);
if (typeid(*oa) == typeid(SetTimelineInOutCommand)) {
}
}
*/
seq.reset();
created_sequence = false;