Merge branch 'master' of https://github.com/olive-editor/olive into furtherocio

This commit is contained in:
itsmattkc
2019-03-17 10:42:43 +11:00
5 changed files with 62 additions and 35 deletions
+12 -2
View File
@@ -416,9 +416,14 @@ void Effect::delete_self() {
}
void Effect::move_up() {
int index_of_effect = parent_clip->IndexOfEffect(this);
if (index_of_effect == 0) {
return;
}
MoveEffectCommand* command = new MoveEffectCommand();
command->clip = parent_clip;
command->from = parent_clip->IndexOfEffect(this);
command->from = index_of_effect;
command->to = command->from - 1;
olive::UndoStack.push(command);
panel_effect_controls->Reload();
@@ -426,9 +431,14 @@ void Effect::move_up() {
}
void Effect::move_down() {
int index_of_effect = parent_clip->IndexOfEffect(this);
if (index_of_effect == parent_clip->effects.size()-1) {
return;
}
MoveEffectCommand* command = new MoveEffectCommand();
command->clip = parent_clip;
command->from = parent_clip->IndexOfEffect(this);
command->from = index_of_effect;
command->to = command->from + 1;
olive::UndoStack.push(command);
panel_effect_controls->Reload();