fixed snapping bug causing 0 frame clips to occur

This commit is contained in:
itsmattkc
2018-07-08 14:55:52 +01:00
parent 4b29e19a3e
commit ef31d6a29d
6 changed files with 28 additions and 16 deletions
+10 -2
View File
@@ -6,8 +6,7 @@
#include <QDebug>
Sequence::Sequence() {
undo_pointer = -1;
undo_add_current();
reset_undo();
}
Sequence::~Sequence() {
@@ -128,6 +127,15 @@ int Sequence::split_clip(int p, long frame) {
return -1;
}
void Sequence::reset_undo() {
while (undo_stack.size() > 0) {
delete undo_stack.last();
undo_stack.removeLast();
}
undo_pointer = -1;
undo_add_current();
}
void Sequence::undo_add_current() {
if (undo_stack.size() == UNDO_LIMIT) {
delete undo_stack.at(0);