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
f74787ed
Commit
f74787ed
authored
Nov 19, 2020
by
Jean-Baptiste Mardelle
Browse files
Select subtitle item when moving between subtitles from the widget
parent
299cd9e3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/core.cpp
View file @
f74787ed
...
...
@@ -270,6 +270,13 @@ void Core::selectBinClip(const QString &clipId, int frame, const QPoint &zone)
m_binWidget
->
selectClipById
(
clipId
,
frame
,
zone
);
}
void
Core
::
selectTimelineItem
(
int
id
)
{
if
(
m_guiConstructed
&&
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
getModel
())
{
m_mainWindow
->
getCurrentTimeline
()
->
controller
()
->
getModel
()
->
requestAddToSelection
(
id
,
true
);
}
}
std
::
shared_ptr
<
JobManager
>
Core
::
jobManager
()
{
return
m_jobManager
;
...
...
src/core.h
View file @
f74787ed
...
...
@@ -109,6 +109,8 @@ public:
Bin
*
bin
();
/** @brief Select a clip in the Bin from its id. */
void
selectBinClip
(
const
QString
&
id
,
int
frame
=
-
1
,
const
QPoint
&
zone
=
QPoint
());
/** @brief Selects an item in the current timeline (clip, composition, subtitle). */
void
selectTimelineItem
(
int
id
);
/** @brief Returns a pointer to the model of the project bin. */
std
::
shared_ptr
<
ProjectItemModel
>
projectItemModel
();
/** @brief Returns a pointer to the job manager. Please do not store it. */
...
...
src/dialogs/subtitleedit.cpp
View file @
f74787ed
...
...
@@ -122,7 +122,7 @@ void SubtitleEdit::goToPrevious()
}
GenTime
prev
=
m_model
->
getStartPosForId
(
id
);
pCore
->
getMonitor
(
Kdenlive
::
ProjectMonitor
)
->
requestSeek
(
prev
.
frames
(
pCore
->
getCurrentFps
()));
setActiveSubtitle
(
id
);
pCore
->
selectTimelineItem
(
id
);
}
}
}
...
...
@@ -137,7 +137,7 @@ void SubtitleEdit::goToNext()
}
GenTime
prev
=
m_model
->
getStartPosForId
(
id
);
pCore
->
getMonitor
(
Kdenlive
::
ProjectMonitor
)
->
requestSeek
(
prev
.
frames
(
pCore
->
getCurrentFps
()));
setActiveSubtitle
(
id
);
pCore
->
selectTimelineItem
(
id
);
}
}
}
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