Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
3ed0a9a9
Commit
3ed0a9a9
authored
Aug 31, 2021
by
Julius Künzel
⚠
Browse files
Allow to slip only non-endless clips (no compositions etc.)
parent
4d08de25
Pipeline
#77585
passed with stage
in 8 minutes and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/timelinecontroller.cpp
View file @
3ed0a9a9
...
...
@@ -1950,13 +1950,30 @@ void TimelineController::slipPosChanged(int offset) {
bool
TimelineController
::
requestStartTrimmingMode
(
int
mainClipId
,
bool
onlyCurrent
)
{
std
::
unordered_set
<
int
>
sel
=
m_model
->
getCurrentSelection
();
std
::
unordered_set
<
int
>
newSel
;
if
(
sel
.
empty
()
&&
mainClipId
!=
-
1
)
{
m_model
->
requestAddToSelection
(
mainClipId
,
true
);
for
(
int
i
:
sel
)
{
if
(
m_model
->
isClip
(
i
)
&&
m_model
->
getClipPtr
(
i
)
->
getMaxDuration
()
!=
-
1
)
{
newSel
.
insert
(
i
);
}
}
if
(
mainClipId
!=
-
1
&&
!
m_model
->
isClip
(
mainClipId
)
&&
m_model
->
getClipPtr
(
mainClipId
)
->
getMaxDuration
()
==
-
1
)
{
mainClipId
=
-
1
;
}
if
(
newSel
.
empty
()
&&
mainClipId
!=
-
1
)
{
newSel
.
insert
(
mainClipId
);
m_trimmingMainClip
=
mainClipId
;
emit
trimmingMainClipChanged
();
}
if
(
newSel
!=
sel
)
{
m_model
->
requestSetSelection
(
newSel
);
return
false
;
}
else
if
(
sel
.
empty
())
{
}
if
(
sel
.
empty
())
{
return
false
;
}
...
...
@@ -1982,15 +1999,6 @@ bool TimelineController::requestStartTrimmingMode(int mainClipId, bool onlyCurre
std
::
vector
<
std
::
shared_ptr
<
Mlt
::
Producer
>>
producers
;
std
::
shared_ptr
<
ClipModel
>
mainClip
=
m_model
->
getClipPtr
(
mainClipId
);
if
(
mainClip
->
getMaxDuration
()
==
-
1
)
{
for
(
int
i
:
sel
)
{
if
(
i
!=
mainClipId
&&
m_model
->
isClip
(
i
)
&&
m_model
->
getClipPtr
(
i
)
->
getMaxDuration
()
!=
-
1
)
{
mainClip
=
m_model
->
getClipPtr
(
i
);
break
;
}
}
}
if
(
mainClip
->
getMaxDuration
()
==
-
1
)
{
return
false
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment