diff options
author | YuSanka <yusanka@gmail.com> | 2018-11-14 14:33:48 +0300 |
---|---|---|
committer | YuSanka <yusanka@gmail.com> | 2018-11-14 14:35:15 +0300 |
commit | 62aa34b4440f3ecdf560adc46b9470cbfe3f152f (patch) | |
tree | 02cb10c767ce9aabf7f2114921a3beb552955f4d /src/slic3r/GUI/Field.hpp | |
parent | 86c1f5b4177f9c3ba95f89492c223deaffe746da (diff) |
SpinCtrsl inside Manipulation pane is replaced to TextCtrls
+ Added "proces_enter" mode for TextCtrl (The control will generate the event wxEVT_TEXT_ENTER)
Diffstat (limited to 'src/slic3r/GUI/Field.hpp')
-rw-r--r-- | src/slic3r/GUI/Field.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Field.hpp b/src/slic3r/GUI/Field.hpp index 58c6afebe..29ae6f9ce 100644 --- a/src/slic3r/GUI/Field.hpp +++ b/src/slic3r/GUI/Field.hpp @@ -34,7 +34,7 @@ using t_kill_focus = std::function<void()>; using t_change = std::function<void(t_config_option_key, const boost::any&)>; using t_back_to_init = std::function<void(const std::string&)>; -wxString double_to_string(double const value); +wxString double_to_string(double const value, const int max_precision = 4); class MyButton : public wxButton { @@ -139,9 +139,10 @@ public: /// Factory method for generating new derived classes. template<class T> - static t_field Create(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id) // interface for creating shared objects + static t_field Create(wxWindow* parent, const ConfigOptionDef& opt, const t_config_option_key& id, const bool process_enter = false)// interface for creating shared objects { auto p = Slic3r::make_unique<T>(parent, opt, id); + p->m_process_enter = process_enter; p->PostInitialize(); return std::move(p); //!p; } @@ -221,6 +222,9 @@ protected: // current value boost::any m_value; + + //this variable shows a mode of a call of the on_change function + bool m_process_enter { false }; friend class OptionsGroup; }; |