added razor/edit tool snapping

This commit is contained in:
itsmattkc
2018-06-08 02:11:45 -07:00
parent 544c77828a
commit cb24f78bd5
9 changed files with 91 additions and 38 deletions
-12
View File
@@ -113,20 +113,10 @@ void Sequence::split_clip(int i, long frame) {
}
}
void Sequence::split_at_playhead(long frame) {
for (int j=0;j<clip_count();j++) {
Clip& c = get_clip(j);
if (c.timeline_in < frame && c.timeline_out > frame) {
split_clip(j, frame);
}
}
}
void Sequence::undo_add_current() {
undo_pointer++;
undo_stack.resize(undo_pointer);
undo_stack.append(clips);
qDebug() << "a pointer:" << undo_pointer << undo_stack.size();
}
void Sequence::undo() {
@@ -136,7 +126,6 @@ void Sequence::undo() {
} else {
qDebug() << "[INFO] No more undos";
}
qDebug() << "u pointer:" << undo_pointer << undo_stack.size();
}
void Sequence::redo() {
if (undo_pointer == undo_stack.size() - 1) {
@@ -145,5 +134,4 @@ void Sequence::redo() {
undo_pointer++;
clips = undo_stack[undo_pointer];
}
qDebug() << "r pointer:" << undo_pointer << undo_stack.size();
}