Implemented em_unit() function for getting of em_unit value from correct parent.

+ Added correct em_unit to Fields
This commit is contained in:
YuSanka 2019-04-17 21:35:53 +02:00
parent 3e9c0c396e
commit 077321b228
4 changed files with 64 additions and 20 deletions

View file

@ -220,6 +220,9 @@ public:
virtual void rescale() {
m_Undo_to_sys_btn->rescale();
m_Undo_btn->rescale();
// update em_unit value
m_em_unit = em_unit(m_parent);
}
protected:
@ -241,6 +244,8 @@ protected:
// current value
boost::any m_value;
int m_em_unit;
bool bEnterPressed = false;
friend class OptionsGroup;
@ -432,6 +437,8 @@ public:
void set_value(const boost::any& value, bool change_event = false);
boost::any& get_value() override;
void rescale() override;
void enable() override {
x_textctrl->Enable();
y_textctrl->Enable(); }