Leave the selected range in the audio display unchanged when switching to an untimed line as 2.1.x did
Originally committed to SVN as r6748.
This commit is contained in:
parent
1bd24d837c
commit
479de87068
1 changed files with 25 additions and 9 deletions
|
@ -257,11 +257,21 @@ public:
|
||||||
|
|
||||||
/// Set the dialogue line which this is tracking and reset the markers to
|
/// Set the dialogue line which this is tracking and reset the markers to
|
||||||
/// the line's time range
|
/// the line's time range
|
||||||
void SetLine(AssDialogue *new_line)
|
/// @return Were the markers actually set to the line's time?
|
||||||
|
bool SetLine(AssDialogue *new_line)
|
||||||
|
{
|
||||||
|
if (!line || new_line->End > 0)
|
||||||
{
|
{
|
||||||
line = new_line;
|
line = new_line;
|
||||||
marker1.SetPosition(new_line->Start);
|
marker1.SetPosition(new_line->Start);
|
||||||
marker2.SetPosition(new_line->End);
|
marker2.SetPosition(new_line->End);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
line = new_line;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -513,7 +523,7 @@ void AudioTimingControllerDialogue::Next(NextMode mode)
|
||||||
|
|
||||||
cmd::call("grid/line/next/create", context);
|
cmd::call("grid/line/next/create", context);
|
||||||
|
|
||||||
if (mode == LINE_RESET_DEFAULT || *active_line.GetRightMarker() == 0) {
|
if (mode == LINE_RESET_DEFAULT || active_line.GetLine()->End == 0) {
|
||||||
const int default_duration = OPT_GET("Timing/Default Duration")->GetInt();
|
const int default_duration = OPT_GET("Timing/Default Duration")->GetInt();
|
||||||
// Setting right first here so that they don't get switched and the
|
// Setting right first here so that they don't get switched and the
|
||||||
// same marker gets set twice
|
// same marker gets set twice
|
||||||
|
@ -564,12 +574,18 @@ void AudioTimingControllerDialogue::Revert()
|
||||||
{
|
{
|
||||||
if (AssDialogue *line = context->selectionController->GetActiveLine())
|
if (AssDialogue *line = context->selectionController->GetActiveLine())
|
||||||
{
|
{
|
||||||
active_line.SetLine(line);
|
|
||||||
modified_lines.clear();
|
modified_lines.clear();
|
||||||
|
if (active_line.SetLine(line))
|
||||||
|
{
|
||||||
AnnounceUpdatedPrimaryRange();
|
AnnounceUpdatedPrimaryRange();
|
||||||
if (inactive_line_mode->GetInt() == 0)
|
if (inactive_line_mode->GetInt() == 0)
|
||||||
AnnounceUpdatedStyleRanges();
|
AnnounceUpdatedStyleRanges();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
modified_lines.insert(&active_line);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RegenerateInactiveLines();
|
RegenerateInactiveLines();
|
||||||
RegenerateSelectedLines();
|
RegenerateSelectedLines();
|
||||||
|
|
Loading…
Reference in a new issue