SpinCtrsl inside Manipulation pane is replaced to TextCtrls

+ Added "proces_enter" mode for TextCtrl (The control will generate the event wxEVT_TEXT_ENTER)
This commit is contained in:
YuSanka 2018-11-14 12:33:48 +01:00
parent 86c1f5b417
commit 62aa34b444
7 changed files with 87 additions and 80 deletions

View file

@ -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;
};