Correct show_preset_comboboxes

This commit is contained in:
YuSanka 2018-08-07 17:23:48 +02:00
parent 709b898eba
commit da16b28c14
6 changed files with 80 additions and 22 deletions

View file

@ -38,6 +38,7 @@ wxString double_to_string(double const value);
class MyButton : public wxButton
{
bool hidden = false; // never show button if it's hidden ones
public:
MyButton() {}
MyButton(wxWindow* parent, wxWindowID id, const wxString& label = wxEmptyString,
@ -52,6 +53,12 @@ public:
// overridden from wxWindow base class
virtual bool
AcceptsFocusFromKeyboard() const { return false; }
virtual bool Show(bool show = true) override {
if (!show)
hidden = true;
return wxButton::Show(!hidden);
}
};
class Field {