fixed a linking issue and undo crash

This commit is contained in:
itsmattkc
2019-01-08 17:13:07 +11:00
parent 21af8fad0c
commit d43cb42f02
2 changed files with 5 additions and 4 deletions
+3 -4
View File
@@ -1391,14 +1391,13 @@ void Timeline::toggle_links() {
for (int i=0;i<sequence->clips.size();i++) {
Clip* c = sequence->clips.at(i);
if (c != NULL && is_clip_selected(c, true)) {
command->clips.append(i);
if (!command->clips.contains(i)) command->clips.append(i);
if (c->linked.size() > 0) {
command->link = false; // prioritize unlinking
for (int j=0;j<c->linked.size();j++) { // add links to the command
if (!command->clips.contains(c->linked.at(j))) {
command->clips.append(c->linked.at(j));
}
if (!command->clips.contains(c->linked.at(j))) command->clips.append(c->linked.at(j));
}
}
}
+2
View File
@@ -489,6 +489,7 @@ AddClipCommand::~AddClipCommand() {
}
void AddClipCommand::undo() {
panel_effect_controls->clear_effects(true);
for (int i=0;i<clips.size();i++) {
Clip* c = seq->clips.last();
panel_timeline->deselect_area(c->timeline_in, c->timeline_out, c->track);
@@ -539,6 +540,7 @@ void LinkCommand::undo() {
void LinkCommand::redo() {
old_links.clear();
for (int i=0;i<clips.size();i++) {
dout << clips.at(i);
Clip* c = s->clips.at(clips.at(i));
if (link) {
for (int j=0;j<clips.size();j++) {