Fixed bug with highlighting of modified parameters after changing the profile
This commit is contained in:
parent
9ebb0f27c1
commit
419721ce22
2 changed files with 16 additions and 10 deletions
|
@ -97,6 +97,7 @@ void Tab::create_preset_tab(PresetBundle *preset_bundle)
|
||||||
if (selected_item >= 0){
|
if (selected_item >= 0){
|
||||||
std::string selected_string = m_presets_choice->GetString(selected_item).ToUTF8().data();
|
std::string selected_string = m_presets_choice->GetString(selected_item).ToUTF8().data();
|
||||||
select_preset(selected_string);
|
select_preset(selected_string);
|
||||||
|
update_changed_ui();
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -152,13 +153,9 @@ void add_correct_opts_to_dirty_options(const std::string &opt_key, std::vector<s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the combo box label of the selected preset based on its "dirty" state,
|
// Update UI according to changes
|
||||||
// comparing the selected preset config with $self->{config}.
|
void Tab::update_changed_ui()
|
||||||
void Tab::update_dirty(){
|
{
|
||||||
m_presets->update_dirty_ui(m_presets_choice);
|
|
||||||
on_presets_changed();
|
|
||||||
|
|
||||||
// Update UI according to changes
|
|
||||||
auto dirty_options = m_presets->current_dirty_options();
|
auto dirty_options = m_presets->current_dirty_options();
|
||||||
|
|
||||||
if (name() == "printer"){
|
if (name() == "printer"){
|
||||||
|
@ -201,7 +198,7 @@ void Tab::update_dirty(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete undirty options from m_dirty_options
|
// Delete clear options from m_dirty_options
|
||||||
for (auto i = 0; i < m_dirty_options.size(); ++i)
|
for (auto i = 0; i < m_dirty_options.size(); ++i)
|
||||||
{
|
{
|
||||||
const std::string &opt_key = m_dirty_options[i];
|
const std::string &opt_key = m_dirty_options[i];
|
||||||
|
@ -223,6 +220,14 @@ void Tab::update_dirty(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update the combo box label of the selected preset based on its "dirty" state,
|
||||||
|
// comparing the selected preset config with $self->{config}.
|
||||||
|
void Tab::update_dirty(){
|
||||||
|
m_presets->update_dirty_ui(m_presets_choice);
|
||||||
|
on_presets_changed();
|
||||||
|
update_changed_ui();
|
||||||
|
}
|
||||||
|
|
||||||
void Tab::update_tab_ui()
|
void Tab::update_tab_ui()
|
||||||
{
|
{
|
||||||
m_presets->update_tab_ui(m_presets_choice, m_show_incompatible_presets);
|
m_presets->update_tab_ui(m_presets_choice, m_show_incompatible_presets);
|
||||||
|
|
|
@ -146,6 +146,7 @@ public:
|
||||||
void toggle_show_hide_incompatible();
|
void toggle_show_hide_incompatible();
|
||||||
void update_show_hide_incompatible_button();
|
void update_show_hide_incompatible_button();
|
||||||
void update_ui_from_settings();
|
void update_ui_from_settings();
|
||||||
|
void update_changed_ui();
|
||||||
|
|
||||||
PageShp add_options_page(wxString title, std::string icon, bool is_extruder_pages = false);
|
PageShp add_options_page(wxString title, std::string icon, bool is_extruder_pages = false);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue