Start of realization UI to visualize changes

This commit is contained in:
YuSanka 2018-03-02 09:08:11 +01:00
parent 541b51c524
commit 222368f7e8
7 changed files with 44 additions and 17 deletions

View file

@ -139,6 +139,13 @@ PageShp Tab::add_options_page(wxString title, std::string icon, bool is_extruder
void Tab::update_dirty(){
m_presets->update_dirty_ui(m_presets_choice);
on_presets_changed();
auto dirty_options = m_presets->current_dirty_options();
for (auto opt_key : dirty_options){
if (find(m_dirty_options.begin(), m_dirty_options.end(), opt_key) == m_dirty_options.end()){
get_field(opt_key)->m_Label->SetBackgroundColour(*get_modified_label_clr());
m_dirty_options.push_back(opt_key);
}
}
}
void Tab::update_tab_ui()
@ -211,6 +218,7 @@ void Tab::load_config(DynamicPrintConfig config)
}
change_opt_value(*m_config, opt_key, value);
modified = 1;
// get_field(opt_key)->m_Label->SetBackgroundColour(*get_modified_label_clr());
}
if (modified) {
update_dirty();