Select the first line when opening a file
Originally committed to SVN as r4611.
This commit is contained in:
parent
5598b787c7
commit
934da32931
1 changed files with 4 additions and 1 deletions
|
@ -712,8 +712,11 @@ void FrameMain::LoadSubtitles (wxString filename,wxString charset) {
|
||||||
AssFile::StackReset();
|
AssFile::StackReset();
|
||||||
if (isFile) {
|
if (isFile) {
|
||||||
AssFile::top->Load(filename,charset);
|
AssFile::top->Load(filename,charset);
|
||||||
SubsGrid->SetSelectedSet(SubtitleSelectionController::Selection());
|
|
||||||
SubsGrid->UpdateMaps();
|
SubsGrid->UpdateMaps();
|
||||||
|
if (SubsGrid->GetRows()) {
|
||||||
|
SubsGrid->SetActiveLine(SubsGrid->GetDialogue(0));
|
||||||
|
SubsGrid->SelectRow(0);
|
||||||
|
}
|
||||||
wxFileName fn(filename);
|
wxFileName fn(filename);
|
||||||
StandardPaths::SetPathValue(_T("?script"),fn.GetPath());
|
StandardPaths::SetPathValue(_T("?script"),fn.GetPath());
|
||||||
OPT_SET("Path/Last/Subtitles")->SetString(STD_STR(fn.GetPath()));
|
OPT_SET("Path/Last/Subtitles")->SetString(STD_STR(fn.GetPath()));
|
||||||
|
|
Loading…
Reference in a new issue