Revert buttons are added for options which have no related field but some widgets (like buttons)
+ Code refactoring: variables contained an information about revert buttons and functions to update them are extracted to the separate class UndoValueUIManager. And Field and Line classes are inherited from UndoValueUIManager now.
This commit is contained in:
parent
88521bb839
commit
32ff20dbc7
6 changed files with 173 additions and 106 deletions
|
@ -77,6 +77,7 @@ public:
|
|||
void sys_color_changed();
|
||||
void refresh();
|
||||
Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const;
|
||||
Line* get_line(const t_config_option_key& opt_key);
|
||||
bool set_value(const t_config_option_key& opt_key, const boost::any& value);
|
||||
ConfigOptionsGroupShp new_optgroup(const wxString& title, int noncommon_label_width = -1);
|
||||
const ConfigOptionsGroupShp get_optgroup(const wxString& title) const;
|
||||
|
@ -234,10 +235,6 @@ public:
|
|||
ogStaticText* m_parent_preset_description_line = nullptr;
|
||||
ScalableButton* m_detach_preset_btn = nullptr;
|
||||
|
||||
// map of option name -> wxColour (color of the colored label, associated with option)
|
||||
// Used for options which don't have corresponded field
|
||||
std::map<std::string, wxColour> m_colored_Label_colors;
|
||||
|
||||
// Counter for the updating (because of an update() function can have a recursive behavior):
|
||||
// 1. increase value from the very beginning of an update() function
|
||||
// 2. decrease value at the end of an update() function
|
||||
|
@ -311,6 +308,7 @@ public:
|
|||
virtual void msw_rescale();
|
||||
virtual void sys_color_changed();
|
||||
Field* get_field(const t_config_option_key& opt_key, int opt_index = -1) const;
|
||||
Line* get_line(const t_config_option_key& opt_key);
|
||||
std::pair<OG_CustomCtrl*, bool*> get_custom_ctrl_with_blinking_ptr(const t_config_option_key& opt_key, int opt_index = -1);
|
||||
|
||||
Field* get_field(const t_config_option_key &opt_key, Page** selected_page, int opt_index = -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue