Fix some more minor editbox regressions introduced in r2859. Patch by Harukalover, updates #794

Originally committed to SVN as r2861.
This commit is contained in:
Karl Blomster 2009-04-26 04:31:19 +00:00
parent eed65e8945
commit 51df55edd7
2 changed files with 6 additions and 4 deletions

View File

@ -1639,6 +1639,7 @@ void FrameMain::OnEditBoxCommit(wxCommandEvent &event) {
// Is the text edit
if (focus == EditBox->TextEdit) {
EditBox->Commit(true);
EditBox->Update(true);
}
// Other window

View File

@ -267,8 +267,11 @@ void SubsEditBox::Update (bool timeOnly,bool weak) {
int start = curdiag->Start.GetMS();
int end = curdiag->End.GetMS();
StartTime->SetTime(start);
StartTime->Update();
EndTime->SetTime(end);
EndTime->Update();
Duration->SetTime(end-start);
Duration->Update();
if (!timeOnly) {
TextEdit->SetTextTo(curdiag->Text);
Layer->SetValue(wxString::Format(_T("%i"),curdiag->Layer));
@ -342,6 +345,8 @@ void SubsEditBox::SetToLine(int n,bool weak) {
enabled = true;
if (n != linen) {
linen = n;
StartTime->Update();
EndTime->Update();
Duration->Update();
}
}
@ -912,10 +917,6 @@ void SubsEditBox::Commit(bool stay) {
// Update file
if (!updated && textNeedsCommit) {
if (StartTime->HasBeenModified() || EndTime->HasBeenModified()) {
StartTime->Update();
EndTime->Update();
}
grid->ass->FlagAsModified(_("editing"));
grid->CommitChanges();
}