Commit 9a89c55d authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix tests

parent 1fbc03bb
Pipeline #45782 canceled with stage
......@@ -2889,8 +2889,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);
}
......@@ -3090,11 +3090,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