mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-26 14:49:43 -07:00
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:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user