effects system rewrite
This commit is contained in:
+3
-3
@@ -193,9 +193,9 @@ void SetTimelineInOutCommand::redo() {
|
||||
mainWindow->setWindowModified(true);
|
||||
}
|
||||
|
||||
AddEffectCommand::AddEffectCommand(Clip* c, int ieffect) :
|
||||
AddEffectCommand::AddEffectCommand(Clip* c, EffectMeta *e) :
|
||||
clip(c),
|
||||
effect(ieffect),
|
||||
meta(e),
|
||||
ref(NULL),
|
||||
done(false),
|
||||
old_project_changed(mainWindow->isWindowModified())
|
||||
@@ -213,7 +213,7 @@ void AddEffectCommand::undo() {
|
||||
|
||||
void AddEffectCommand::redo() {
|
||||
if (ref == NULL) {
|
||||
ref = create_effect(effect, clip);
|
||||
ref = new Effect(clip, *meta);
|
||||
}
|
||||
clip->effects.append(ref);
|
||||
done = true;
|
||||
|
||||
+3
-2
@@ -12,6 +12,7 @@ class Transition;
|
||||
struct Clip;
|
||||
struct Sequence;
|
||||
struct Media;
|
||||
struct EffectMeta;
|
||||
|
||||
#include "project/marker.h"
|
||||
#include "project/selection.h"
|
||||
@@ -90,13 +91,13 @@ private:
|
||||
|
||||
class AddEffectCommand : public QUndoCommand {
|
||||
public:
|
||||
AddEffectCommand(Clip* c, int ieffect);
|
||||
AddEffectCommand(Clip* c, EffectMeta* e);
|
||||
~AddEffectCommand();
|
||||
void undo();
|
||||
void redo();
|
||||
private:
|
||||
Clip* clip;
|
||||
int effect;
|
||||
EffectMeta* meta;
|
||||
Effect* ref;
|
||||
bool done;
|
||||
bool old_project_changed;
|
||||
|
||||
Reference in New Issue
Block a user