Kanji timer: don't FlagAsModified if no changes are made

Originally committed to SVN as r943.
This commit is contained in:
Dan Donovan 2007-03-08 18:57:55 +00:00
parent 4dd9a52482
commit cd4332ac04

View file

@ -170,17 +170,19 @@ END_EVENT_TABLE()
void DialogKanjiTimer::OnClose(wxCommandEvent &event) {
Options.SetBool(_T("kanji timer interpolation"),Interpolate->IsChecked());
Options.Save();
bool modified = LinesToChange.empty();
while(LinesToChange.empty()==false) {
std::pair<int,wxString> p = LinesToChange.back();
LinesToChange.pop_back();
AssDialogue *line = grid->GetDialogue(p.first);
line->Text = p.second;
}
if (modified) {
grid->ass->FlagAsModified(_("kanji timing"));
grid->CommitChanges();
LinesToChange.clear();
}
Close();
}