Fix CheckboxFileDialog

This commit is contained in:
Vojtech Kral 2018-10-19 13:38:35 +02:00
parent 42a77316ba
commit b6251dd85b
2 changed files with 8 additions and 1 deletions

View file

@ -48,7 +48,7 @@ CheckboxFileDialog::CheckboxFileDialog(wxWindow *parent,
return panel;
};
SetExtraControlCreator(*extra_control_creator.target<ExtraControlCreatorFunction>());
SetExtraControlCreator(control_creator_trampoline);
}
bool CheckboxFileDialog::get_checkbox_value() const
@ -56,6 +56,11 @@ bool CheckboxFileDialog::get_checkbox_value() const
return this->cbox != nullptr ? cbox->IsChecked() : false;
}
wxWindow* CheckboxFileDialog::control_creator_trampoline(wxWindow *parent)
{
auto *self = dynamic_cast<CheckboxFileDialog*>(parent);
return self != nullptr ? self->extra_control_creator(parent) : nullptr;
}
WindowMetrics WindowMetrics::from_window(wxTopLevelWindow *window)

View file

@ -39,6 +39,8 @@ public:
private:
std::function<wxWindow*(wxWindow*)> extra_control_creator;
wxCheckBox *cbox;
static wxWindow* control_creator_trampoline(wxWindow *);
};