Commit 338ef953 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix tests

parent 687dea16
......@@ -2884,8 +2884,8 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
int offset = getItemPlaytime(itemId);
int tid = getItemTrackId(itemId);
int out = offset;
if (tid != -1) {
in = getItemPosition(itemId);
if (tid != -1 || isComposition(itemId)) {
in = qMax(0, getItemPosition(itemId));
out += in;
size = requestItemResizeInfo(itemId, in, out, size, right, snapDistance);
}
......@@ -3085,11 +3085,10 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
continue;
}
if (right) {
finalSize = finalPos - getItemPosition(id);
finalSize = finalPos - qMax(0, getItemPosition(id));
} else {
finalSize = getItemPosition(id) + getItemPlaytime(id) - finalPos;
finalSize = qMax(0, getItemPosition(id)) + getItemPlaytime(id) - finalPos;
}
result = result && requestItemResize(id, finalSize, right, logUndo, undo, redo);
resizedCount++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment