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
095b5ca9
Commit
095b5ca9
authored
Feb 19, 2021
by
Julius Künzel
Browse files
Subtitles: fix crash on "select clip" shortcut
Fixes
#941
parent
d1e71017
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/timelinecontroller.cpp
View file @
095b5ca9
...
...
@@ -287,8 +287,13 @@ int TimelineController::selectedTrack() const
void
TimelineController
::
selectCurrentItem
(
ObjectType
type
,
bool
select
,
bool
addToCurrent
)
{
int
currentClip
=
type
==
ObjectType
::
TimelineClip
?
m_model
->
getClipByPosition
(
m_activeTrack
,
pCore
->
getTimelinePosition
())
:
m_model
->
getCompositionByPosition
(
m_activeTrack
,
pCore
->
getTimelinePosition
());
int
currentClip
=
-
1
;
if
(
type
==
ObjectType
::
TimelineClip
)
{
currentClip
=
m_activeTrack
==
-
2
?
m_model
->
getSubtitleByPosition
(
pCore
->
getTimelinePosition
())
:
m_model
->
getClipByPosition
(
m_activeTrack
,
pCore
->
getTimelinePosition
());
}
else
{
currentClip
=
m_model
->
getCompositionByPosition
(
m_activeTrack
,
pCore
->
getTimelinePosition
());
}
if
(
currentClip
==
-
1
)
{
pCore
->
displayMessage
(
i18n
(
"No item under timeline cursor in active track"
),
InformationMessage
,
500
);
return
;
...
...
Write
Preview
Markdown
is supported
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