Fixed a regression bug (typo) in update of OptionGroups.

This commit is contained in:
bubnikv 2019-05-10 16:09:42 +02:00
parent 4df38d4c4b
commit 4b11abff26
2 changed files with 5 additions and 2 deletions

View File

@ -546,7 +546,7 @@ void MainFrame::init_menubar()
{ {
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")), append_menu_item(helpMenu, wxID_ANY, _(L("Prusa 3D &Drivers")), _(L("Open the Prusa3D drivers download page in your browser")),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://www.prusa3d.com/drivers/"); }); [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://www.prusa3d.com/drivers/"); });
append_menu_item(helpMenu, wxID_ANY, _(L("Prusa Edition &Releases")), _(L("Open the Prusa Edition releases page in your browser")), append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/slic3r/releases"); }); [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://github.com/prusa3d/slic3r/releases"); });
//# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{ //# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{
//# wxTheApp->check_version(1); //# wxTheApp->check_version(1);

View File

@ -438,11 +438,14 @@ void ConfigOptionsGroup::on_kill_focus(const std::string& opt_key)
void ConfigOptionsGroup::reload_config() void ConfigOptionsGroup::reload_config()
{ {
for (auto &kvp : m_opt_map) { for (auto &kvp : m_opt_map) {
// Name of the option field (name of the configuration key, possibly suffixed with '#' and the index of a scalar inside a vector.
const std::string &opt_id = kvp.first; const std::string &opt_id = kvp.first;
// option key (may be scalar or vector)
const std::string &opt_key = kvp.second.first; const std::string &opt_key = kvp.second.first;
// index in the vector option, zero for scalars
int opt_index = kvp.second.second; int opt_index = kvp.second.second;
const ConfigOptionDef &option = m_options.at(opt_id).opt; const ConfigOptionDef &option = m_options.at(opt_id).opt;
this->set_value(opt_key, config_value(opt_key, opt_index, option.gui_flags == "serialized")); this->set_value(opt_id, config_value(opt_key, opt_index, option.gui_flags == "serialized"));
} }
} }