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
+5 -5
View File
@@ -42,8 +42,6 @@
#include "project/previewgenerator.h"
#include "ui/mainwindow.h"
QUndoStack olive::UndoStack;
MoveClipAction::MoveClipAction(Clip *c, long iin, long iout, long iclip_in, int itrack, bool irelative) {
clip = c;
@@ -354,6 +352,7 @@ AddClipCommand::~AddClipCommand() {}
void AddClipCommand::doUndo() {
// clear effects panel
panel_graph_editor->set_row(nullptr);
panel_effect_controls->Clear(true);
for (int i=0;i<clips.size();i++) {
@@ -842,12 +841,13 @@ void EditSequenceCommand::doRedo() {
}
void EditSequenceCommand::update() {
// update tooltip
// TODO/FIXME: this is a lousy way to do this, Media should have a separate fuctionn for updating the tooltip
// Update sequence's tooltip
item->update_tooltip();
for (int i=0;i<seq->clips.size();i++) {
if (seq->clips.at(i) != nullptr) seq->clips.at(i)->refresh();
if (seq->clips.at(i) != nullptr) {
seq->clips.at(i)->refresh();
}
}
if (olive::ActiveSequence == seq) {
-4
View File
@@ -53,10 +53,6 @@ struct EffectMeta;
class EffectRow;
class EffectField;
namespace olive {
extern QUndoStack UndoStack;
}
class OliveAction : public QUndoCommand {
public:
OliveAction(bool iset_window_modified = true);
+3
View File
@@ -0,0 +1,3 @@
#include "undostack.h"
QUndoStack olive::UndoStack;
+10
View File
@@ -0,0 +1,10 @@
#ifndef UNDOSTACK_H
#define UNDOSTACK_H
#include <QUndoStack>
namespace olive {
extern QUndoStack UndoStack;
}
#endif // UNDOSTACK_H