Hook into validator data transfer for the style editor, to make sure the preview box is updated when data are transferred into the window. This fixes #1356. (For whatever reason, the preview was never told to update after the data were transferred before.)

Originally committed to SVN as r5990.
This commit is contained in:
Niels Martin Hansen 2011-12-08 17:01:11 +00:00
parent 0777d3b136
commit 85e1f6ac34
2 changed files with 15 additions and 0 deletions

View File

@ -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

View File

@ -138,6 +138,8 @@ public:
void Apply (bool apply,bool close);
void OnSetColor (int n);
virtual bool TransferDataToWindow();
DECLARE_EVENT_TABLE()
};