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,10 +847,15 @@ void SubtitlesGrid::LoadFromAss (AssFile *_ass,bool keepSelection,bool dontModif
|
||||||
|
|
||||||
// Restore selection
|
// Restore selection
|
||||||
if (keepSelection) {
|
if (keepSelection) {
|
||||||
|
if (srows.empty() || srows[0] >= (signed)selMap.size()) {
|
||||||
|
SelectRow(selMap.size() - 1);
|
||||||
|
}
|
||||||
|
else {
|
||||||
for (size_t i=0;i<srows.size();i++) {
|
for (size_t i=0;i<srows.size();i++) {
|
||||||
SelectRow(srows[i],true);
|
SelectRow(srows[i],true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Select first
|
// Select first
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue