forked from mia/Aegisub
If undo/redo would result in there being no lines selected, select the last line
Originally committed to SVN as r4592.
This commit is contained in:
parent
d8e8f9eb68
commit
e2a42ccb6c
1 changed files with 7 additions and 2 deletions
|
@ -847,8 +847,13 @@ void SubtitlesGrid::LoadFromAss (AssFile *_ass,bool keepSelection,bool dontModif
|
|||
|
||||
// Restore selection
|
||||
if (keepSelection) {
|
||||
for (size_t i=0;i<srows.size();i++) {
|
||||
SelectRow(srows[i],true);
|
||||
if (srows.empty() || srows[0] >= (signed)selMap.size()) {
|
||||
SelectRow(selMap.size() - 1);
|
||||
}
|
||||
else {
|
||||
for (size_t i=0;i<srows.size();i++) {
|
||||
SelectRow(srows[i],true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue