added transition tool (#109)

This commit is contained in:
itsmattkc
2018-11-05 01:00:13 +11:00
parent 5a2b8341e1
commit 74df34cd76
6 changed files with 174 additions and 7 deletions
+4 -1
View File
@@ -220,10 +220,11 @@ void AddEffectCommand::redo() {
mainWindow->setWindowModified(true);
}
AddTransitionCommand::AddTransitionCommand(Clip* c, int itransition, int itype) :
AddTransitionCommand::AddTransitionCommand(Clip* c, int itransition, int itype, int ilength) :
clip(c),
transition(itransition),
type(itype),
length(ilength),
old_project_changed(mainWindow->isWindowModified())
{}
@@ -241,8 +242,10 @@ void AddTransitionCommand::undo() {
void AddTransitionCommand::redo() {
if (type == TA_OPENING_TRANSITION) {
clip->opening_transition = create_transition(transition, clip);
if (length > 0) clip->opening_transition->length = length;
} else {
clip->closing_transition = create_transition(transition, clip);
if (length > 0) clip->closing_transition->length = length;
}
mainWindow->setWindowModified(true);
}