OnInitDialog events are propagated to parent classes now

This commit is contained in:
Simon Rozman 2016-09-30 10:09:11 +02:00
parent 7d986b82d8
commit 7a379a1a87
2 changed files with 9 additions and 1 deletions

View File

@ -231,6 +231,8 @@ protected:
virtual void OnInitDialog(wxInitDialogEvent& event) virtual void OnInitDialog(wxInitDialogEvent& event)
{ {
wxEAPConfigDialogBase::OnInitDialog(event);
// Forward the event to child panels. // Forward the event to child panels.
for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) { for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) {
wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow); wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow);

View File

@ -81,6 +81,8 @@ void wxEAPGeneralDialog::AddContent(wxPanel *content)
void wxEAPGeneralDialog::OnInitDialog(wxInitDialogEvent& event) void wxEAPGeneralDialog::OnInitDialog(wxInitDialogEvent& event)
{ {
wxEAPGeneralDialogBase::OnInitDialog(event);
for (wxSizerItemList::compatibility_iterator panel = m_panels->GetChildren().GetFirst(); panel; panel = panel->GetNext()) for (wxSizerItemList::compatibility_iterator panel = m_panels->GetChildren().GetFirst(); panel; panel = panel->GetNext())
panel->GetData()->GetWindow()->GetEventHandler()->ProcessEvent(event); panel->GetData()->GetWindow()->GetEventHandler()->ProcessEvent(event);
} }
@ -127,6 +129,8 @@ wxEAPCredentialsConnectionDialog::wxEAPCredentialsConnectionDialog(wxWindow *par
void wxEAPCredentialsConnectionDialog::OnInitDialog(wxInitDialogEvent& event) void wxEAPCredentialsConnectionDialog::OnInitDialog(wxInitDialogEvent& event)
{ {
wxEAPCredentialsConnectionDialogBase::OnInitDialog(event);
// Forward the event to child panels. // Forward the event to child panels.
for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) { for (wxWindowList::compatibility_iterator provider = m_providers->GetChildren().GetFirst(); provider; provider = provider->GetNext()) {
wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow); wxWindow *prov = wxDynamicCast(provider->GetData(), wxWindow);
@ -282,10 +286,12 @@ wxEAPConfigWindow::~wxEAPConfigWindow()
} }
void wxEAPConfigWindow::OnInitDialog(wxInitDialogEvent& /*event*/) void wxEAPConfigWindow::OnInitDialog(wxInitDialogEvent& event)
{ {
// Call TransferDataToWindow() manually, as wxScrolledWindow somehow skips that. // Call TransferDataToWindow() manually, as wxScrolledWindow somehow skips that.
TransferDataToWindow(); TransferDataToWindow();
event.Skip();
} }