diff --git a/aegisub/src/dialog_style_editor.cpp b/aegisub/src/dialog_style_editor.cpp index 63f3468b5..690cf3da0 100644 --- a/aegisub/src/dialog_style_editor.cpp +++ b/aegisub/src/dialog_style_editor.cpp @@ -690,6 +690,19 @@ void DialogStyleEditor::LoadPosition() { CentreOnParent(); } +//////////////////////////////////////////////////////////////////////////////////////////////// +// Make sure the preview is updated whenever data are transferred into the window by validators +bool DialogStyleEditor::TransferDataToWindow() +{ + bool res = wxDialog::TransferDataToWindow(); + if (res && SubsPreview) { + UpdateWorkStyle(); + SubsPreview->SetStyle(work); + } + return res; +} + + ///////////////////////////////////// // Static class data saving position diff --git a/aegisub/src/dialog_style_editor.h b/aegisub/src/dialog_style_editor.h index e6d98d18f..4e96a140b 100644 --- a/aegisub/src/dialog_style_editor.h +++ b/aegisub/src/dialog_style_editor.h @@ -138,6 +138,8 @@ public: void Apply (bool apply,bool close); void OnSetColor (int n); + virtual bool TransferDataToWindow(); + DECLARE_EVENT_TABLE() };