Fixed non-correct TextCtrl's update on wxEVT_KILL_FOCUS (partially related to #3482),

when for Parameter validation dialog "Selecting NO caused no change".

OSX:TextCtrl:wxEVT_KILL_FOCUS: Second call is suppressed

+ Under OSX set a little bit more wider width for Fields
This commit is contained in:
YuSanka 2020-02-18 11:09:28 +01:00
parent 1850685431
commit d1e3435956
2 changed files with 34 additions and 11 deletions

View file

@ -225,10 +225,10 @@ public:
bool get_enter_pressed() const { return bEnterPressed; }
void set_enter_pressed(bool pressed) { bEnterPressed = pressed; }
// Values of width to "systematic" alignments of fields
static int def_width() { return 7; }
static int def_width_wider() { return 14; }
static int def_width_thinner() { return 4; }
// Values of width to alignments of fields
static int def_width() ;
static int def_width_wider() ;
static int def_width_thinner() ;
protected:
RevertButton* m_Undo_btn = nullptr;
@ -274,6 +274,11 @@ class TextCtrl : public Field {
bool bChangedValueEvent = true;
void change_field_value(wxEvent& event);
#endif //__WXGTK__
#ifdef __WXOSX__
bool bKilledFocus = false;
#endif // __WXOSX__
public:
TextCtrl(const ConfigOptionDef& opt, const t_config_option_key& id) : Field(opt, id) {}
TextCtrl(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id) : Field(parent, opt, id) {}