mirror of https://github.com/odrling/Aegisub
Disable events while processing all file change events in SubsEditBox as apparently wxComboBox::Clear triggers change events on some platforms
Originally committed to SVN as r4960.
This commit is contained in:
parent
fc9607cbb1
commit
36ded6ef89
|
@ -336,6 +336,7 @@ SubsEditBox::~SubsEditBox() {
|
|||
}
|
||||
|
||||
void SubsEditBox::Update(int type) {
|
||||
SetEvtHandlerEnabled(false);
|
||||
if (type == AssFile::COMMIT_FULL || type == AssFile::COMMIT_UNDO) {
|
||||
/// @todo maybe preserve selection over undo?
|
||||
StyleBox->Clear();
|
||||
|
@ -355,15 +356,16 @@ void SubsEditBox::Update(int type) {
|
|||
ActorBox->Thaw();
|
||||
|
||||
TextEdit->SetSelection(0,0);
|
||||
SetEvtHandlerEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
SetControlsState(!!line);
|
||||
if (!line) {
|
||||
SetEvtHandlerEnabled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
SetEvtHandlerEnabled(false);
|
||||
StartTime->SetTime(line->Start);
|
||||
EndTime->SetTime(line->End);
|
||||
Duration->SetTime(line->End-line->Start);
|
||||
|
|
Loading…
Reference in New Issue