forked from mia/Aegisub
Paint keyframe markers on top of line markers so that they don't vanish when lines are scenetimed
Originally committed to SVN as r6239.
This commit is contained in:
parent
58c7bbd78a
commit
6f7836c11e
3 changed files with 5 additions and 6 deletions
|
@ -498,9 +498,8 @@ SampleRange AudioController::GetPrimaryPlaybackRange() const
|
||||||
void AudioController::GetMarkers(const SampleRange &range, AudioMarkerVector &markers) const
|
void AudioController::GetMarkers(const SampleRange &range, AudioMarkerVector &markers) const
|
||||||
{
|
{
|
||||||
/// @todo Find all sources of markers
|
/// @todo Find all sources of markers
|
||||||
if (keyframes_marker_provider.get()) keyframes_marker_provider->GetMarkers(range, markers);
|
|
||||||
if (video_position_marker_provider.get()) video_position_marker_provider->GetMarkers(range, markers);
|
|
||||||
if (timing_controller) timing_controller->GetMarkers(range, markers);
|
if (timing_controller) timing_controller->GetMarkers(range, markers);
|
||||||
|
if (video_position_marker_provider.get()) video_position_marker_provider->GetMarkers(range, markers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioController::GetLabels(const SampleRange &range, std::vector<AudioLabel> &labels) const
|
void AudioController::GetLabels(const SampleRange &range, std::vector<AudioLabel> &labels) const
|
||||||
|
|
|
@ -213,9 +213,6 @@ class AudioController : public wxEvtHandler, public AudioMarkerProvider, public
|
||||||
/// The current timing mode, if any; owned by the audio controller
|
/// The current timing mode, if any; owned by the audio controller
|
||||||
agi::scoped_ptr<AudioTimingController> timing_controller;
|
agi::scoped_ptr<AudioTimingController> timing_controller;
|
||||||
|
|
||||||
/// Provide keyframe data for audio displays
|
|
||||||
agi::scoped_ptr<AudioMarkerProvider> keyframes_marker_provider;
|
|
||||||
|
|
||||||
/// Provider current video position data for audio display
|
/// Provider current video position data for audio display
|
||||||
agi::scoped_ptr<AudioMarkerProvider> video_position_marker_provider;
|
agi::scoped_ptr<AudioMarkerProvider> video_position_marker_provider;
|
||||||
|
|
||||||
|
|
|
@ -338,7 +338,8 @@ const AudioMarkerDialogueTiming *AudioTimingControllerDialogue::GetRightMarker()
|
||||||
|
|
||||||
void AudioTimingControllerDialogue::GetMarkers(const SampleRange &range, AudioMarkerVector &out_markers) const
|
void AudioTimingControllerDialogue::GetMarkers(const SampleRange &range, AudioMarkerVector &out_markers) const
|
||||||
{
|
{
|
||||||
keyframes_provider.GetMarkers(range, out_markers);
|
// The order matters here; later markers are painted on top of earlier
|
||||||
|
// markers, so the markers that we want to end up on top need to appear last
|
||||||
|
|
||||||
// Copy inactive line markers in the range
|
// Copy inactive line markers in the range
|
||||||
std::vector<InactiveLineMarker>::const_iterator
|
std::vector<InactiveLineMarker>::const_iterator
|
||||||
|
@ -352,6 +353,8 @@ void AudioTimingControllerDialogue::GetMarkers(const SampleRange &range, AudioMa
|
||||||
out_markers.push_back(&active_markers[0]);
|
out_markers.push_back(&active_markers[0]);
|
||||||
if (range.contains(active_markers[1]))
|
if (range.contains(active_markers[1]))
|
||||||
out_markers.push_back(&active_markers[1]);
|
out_markers.push_back(&active_markers[1]);
|
||||||
|
|
||||||
|
keyframes_provider.GetMarkers(range, out_markers);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioTimingControllerDialogue::OnActiveLineChanged(AssDialogue *new_line)
|
void AudioTimingControllerDialogue::OnActiveLineChanged(AssDialogue *new_line)
|
||||||
|
|
Loading…
Reference in a new issue