fixed splitting bug when linked pair were selected

This commit is contained in:
itsmattkc
2018-07-01 04:08:40 +01:00
parent 2b535c4513
commit ab70f04617
3 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.2, 2018-07-01T03:51:18. -->
<!-- Written by QtCreator 4.6.2, 2018-07-01T04:07:52. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
+3 -1
View File
@@ -433,10 +433,12 @@ void Timeline::split_clip_and_relink(Clip* clip, long frame, bool relink) {
// if alt is not down, split clips links too
if (relink) {
bool original_clip_is_selected = is_clip_selected(clip);
// find linked clips of old clip
for (int i=0;i<clip->linked.size();i++) {
Clip* link = sequence->get_clip(clip->linked.at(i));
if (!panel_timeline->is_clip_selected(link)) {
if (original_clip_is_selected != !is_clip_selected(link)) {
Clip* s = sequence->split_clip(link, frame);
if (s != NULL) {
pre_clips.append(link);
+3 -1
View File
@@ -242,7 +242,9 @@ void TimelineWidget::mousePressEvent(QMouseEvent *event) {
{
if (clip_index >= 0) {
Clip* clip = sequence->get_clip(clip_index);
if (clip != NULL) panel_timeline->split_clip_and_relink(clip, panel_timeline->drag_frame_start, !(event->modifiers() & Qt::AltModifier));
if (clip != NULL) {
panel_timeline->split_clip_and_relink(clip, panel_timeline->drag_frame_start, !(event->modifiers() & Qt::AltModifier));
}
}
panel_timeline->splitting = true;
panel_timeline->redraw_all_clips(true);