forked from mia/Aegisub
Use lambdas rather than std::bind(std::ref(Signal)) for signal forwarding
This commit is contained in:
parent
7f289551ae
commit
7161ce167c
2 changed files with 5 additions and 6 deletions
|
@ -432,9 +432,9 @@ AudioTimingControllerDialogue::AudioTimingControllerDialogue(agi::Context *c)
|
||||||
, active_line_connection(c->selectionController->AddActiveLineListener(&AudioTimingControllerDialogue::OnActiveLineChanged, this))
|
, active_line_connection(c->selectionController->AddActiveLineListener(&AudioTimingControllerDialogue::OnActiveLineChanged, this))
|
||||||
, selection_connection(c->selectionController->AddSelectionListener(&AudioTimingControllerDialogue::OnSelectedSetChanged, this))
|
, selection_connection(c->selectionController->AddSelectionListener(&AudioTimingControllerDialogue::OnSelectedSetChanged, this))
|
||||||
{
|
{
|
||||||
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
keyframes_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||||
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
video_position_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||||
seconds_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
seconds_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||||
|
|
||||||
Revert();
|
Revert();
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,11 +172,10 @@ AudioTimingControllerKaraoke::AudioTimingControllerKaraoke(agi::Context *c, AssK
|
||||||
slots.push_back(kara->AddSyllablesChangedListener(&AudioTimingControllerKaraoke::Revert, this));
|
slots.push_back(kara->AddSyllablesChangedListener(&AudioTimingControllerKaraoke::Revert, this));
|
||||||
slots.push_back(OPT_SUB("Audio/Auto/Commit", &AudioTimingControllerKaraoke::OnAutoCommitChange, this));
|
slots.push_back(OPT_SUB("Audio/Auto/Commit", &AudioTimingControllerKaraoke::OnAutoCommitChange, this));
|
||||||
|
|
||||||
keyframes_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
keyframes_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||||
video_position_provider.AddMarkerMovedListener(std::bind(std::ref(AnnounceMarkerMoved)));
|
video_position_provider.AddMarkerMovedListener([=]{ AnnounceMarkerMoved(); });
|
||||||
|
|
||||||
Revert();
|
Revert();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) {
|
void AudioTimingControllerKaraoke::OnAutoCommitChange(agi::OptionValue const& opt) {
|
||||||
|
|
Loading…
Reference in a new issue