forked from mia/Aegisub
Enable "Make times continous" when only one line is selected. Closes #822.
Originally committed to SVN as r4706.
This commit is contained in:
parent
35e33bd036
commit
d8021262df
1 changed files with 9 additions and 0 deletions
|
@ -174,6 +174,7 @@ void SubtitlesGrid::OnPopupMenu(bool alternate) {
|
||||||
menu.AppendSeparator();
|
menu.AppendSeparator();
|
||||||
|
|
||||||
// Adjoin selection
|
// Adjoin selection
|
||||||
|
state = (sels >= 1 && continuous);
|
||||||
menu.Append(MENU_ADJOIN,_("&Make times continuous (change start)"),_("Changes times of subs so start times begin on previous's end time"))->Enable(state);
|
menu.Append(MENU_ADJOIN,_("&Make times continuous (change start)"),_("Changes times of subs so start times begin on previous's end time"))->Enable(state);
|
||||||
menu.Append(MENU_ADJOIN2,_("&Make times continuous (change end)"),_("Changes times of subs so end times begin on next's start time"))->Enable(state);
|
menu.Append(MENU_ADJOIN2,_("&Make times continuous (change end)"),_("Changes times of subs so end times begin on next's start time"))->Enable(state);
|
||||||
|
|
||||||
|
@ -975,6 +976,14 @@ void SubtitlesGrid::JoinLines(int n1,int n2,bool concat) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SubtitlesGrid::AdjoinLines(int n1,int n2,bool setStart) {
|
void SubtitlesGrid::AdjoinLines(int n1,int n2,bool setStart) {
|
||||||
|
if (n1 == n2) {
|
||||||
|
if (setStart) {
|
||||||
|
--n1;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
++n2;
|
||||||
|
}
|
||||||
|
}
|
||||||
// Set start
|
// Set start
|
||||||
if (setStart) {
|
if (setStart) {
|
||||||
AssDialogue *prev = GetDialogue(n1);
|
AssDialogue *prev = GetDialogue(n1);
|
||||||
|
|
Loading…
Add table
Reference in a new issue