Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2019-07-22 14:38:53 +0300
committerYuSanka <yusanka@gmail.com>2019-07-22 14:38:53 +0300
commit7dd63b2c0080378feefb8b92fa1abcbd71afaee3 (patch)
tree070111426151ea5066aabe7a5749591814f01e19 /src/slic3r/GUI/GUI_ObjectSettings.cpp
parentfb39516c650254e5132c87e9018d9af9870968b0 (diff)
Added takesnapshot() call for:
- split of the instances, - renaming of the Object/Volume item - changing of the additional settings.
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectSettings.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectSettings.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectSettings.cpp b/src/slic3r/GUI/GUI_ObjectSettings.cpp
index 16c64360a..8728156ac 100644
--- a/src/slic3r/GUI/GUI_ObjectSettings.cpp
+++ b/src/slic3r/GUI/GUI_ObjectSettings.cpp
@@ -93,6 +93,7 @@ bool ObjectSettings::update_settings_list()
btn->SetToolTip(_(L("Remove parameter")));
btn->Bind(wxEVT_BUTTON, [opt_key, config, this](wxEvent &event) {
+ wxGetApp().plater()->take_snapshot(wxString::Format(_(L("Delete Option %s")), opt_key));
config->erase(opt_key);
wxGetApp().obj_list()->changed_object();
wxTheApp->CallAfter([this]() {
@@ -137,6 +138,13 @@ bool ObjectSettings::update_settings_list()
if (is_extruders_cat)
option.opt.max = wxGetApp().extruders_edited_cnt();
optgroup->append_single_option_line(option);
+
+ optgroup->get_field(opt)->m_on_change = [optgroup](const std::string& opt_id, const boost::any& value) {
+ // first of all take a snapshot and then change value in configuration
+ wxGetApp().plater()->take_snapshot(wxString::Format(_(L("Change Option %s")), opt_id));
+ optgroup->on_change_OG(opt_id, value);
+ };
+
}
optgroup->reload_config();