Only apply blank space check for clips

parent 2dedd2c8
Pipeline #1521 passed with stage
in 20 minutes and 18 seconds
...@@ -1486,13 +1486,13 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU ...@@ -1486,13 +1486,13 @@ int TimelineModel::requestItemResize(int itemId, int size, bool right, bool logU
if (snapDistance > 0) { if (snapDistance > 0) {
Fun temp_undo = []() { return true; }; Fun temp_undo = []() { return true; };
Fun temp_redo = []() { return true; }; Fun temp_redo = []() { return true; };
if (right && size > out - in) { if (right && size > out - in && isClip(itemId)) {
int targetPos = in + size - 1; int targetPos = in + size - 1;
int trackId = getItemTrackId(itemId); int trackId = getItemTrackId(itemId);
if (!getTrackById_const(trackId)->isBlankAt(targetPos)) { if (!getTrackById_const(trackId)->isBlankAt(targetPos)) {
size = getTrackById_const(trackId)->getBlankEnd(out + 1) - in; size = getTrackById_const(trackId)->getBlankEnd(out + 1) - in;
} }
} else if (!right && size > (out - in)) { } else if (!right && size > (out - in) && isClip(itemId)) {
int targetPos = out + 1 - size; int targetPos = out + 1 - size;
int trackId = getItemTrackId(itemId); int trackId = getItemTrackId(itemId);
if (!getTrackById_const(trackId)->isBlankAt(targetPos)) { if (!getTrackById_const(trackId)->isBlankAt(targetPos)) {
......
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