forked from mia/Aegisub
Kanji timer: don't FlagAsModified if no changes are made
Originally committed to SVN as r943.
This commit is contained in:
parent
4dd9a52482
commit
cd4332ac04
1 changed files with 6 additions and 4 deletions
|
@ -170,17 +170,19 @@ END_EVENT_TABLE()
|
||||||
void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
|
void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
|
||||||
Options.SetBool(_T("kanji timer interpolation"),Interpolate->IsChecked());
|
Options.SetBool(_T("kanji timer interpolation"),Interpolate->IsChecked());
|
||||||
Options.Save();
|
Options.Save();
|
||||||
|
bool modified = LinesToChange.empty();
|
||||||
|
|
||||||
while(LinesToChange.empty()==false) {
|
while(LinesToChange.empty()==false) {
|
||||||
std::pair<int,wxString> p = LinesToChange.back();
|
std::pair<int,wxString> p = LinesToChange.back();
|
||||||
LinesToChange.pop_back();
|
LinesToChange.pop_back();
|
||||||
AssDialogue *line = grid->GetDialogue(p.first);
|
AssDialogue *line = grid->GetDialogue(p.first);
|
||||||
line->Text = p.second;
|
line->Text = p.second;
|
||||||
|
|
||||||
}
|
}
|
||||||
grid->ass->FlagAsModified(_("kanji timing"));
|
if (modified) {
|
||||||
grid->CommitChanges();
|
grid->ass->FlagAsModified(_("kanji timing"));
|
||||||
LinesToChange.clear();
|
grid->CommitChanges();
|
||||||
|
LinesToChange.clear();
|
||||||
|
}
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue