From 4b11abff2662294246ad957d96a1561e701a8a49 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 10 May 2019 16:09:42 +0200 Subject: [PATCH 1/2] Fixed a regression bug (typo) in update of OptionGroups. --- src/slic3r/GUI/MainFrame.cpp | 2 +- src/slic3r/GUI/OptionsGroup.cpp | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/MainFrame.cpp b/src/slic3r/GUI/MainFrame.cpp index 38ffada87..7f11ab6e3 100644 --- a/src/slic3r/GUI/MainFrame.cpp +++ b/src/slic3r/GUI/MainFrame.cpp @@ -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")), [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"); }); //# my $versioncheck = $self->_append_menu_item($helpMenu, "Check for &Updates...", "Check for new Slic3r versions", sub{ //# wxTheApp->check_version(1); diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index cdcde972a..6171822d2 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -438,11 +438,14 @@ void ConfigOptionsGroup::on_kill_focus(const std::string& opt_key) void ConfigOptionsGroup::reload_config() { 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; + // option key (may be scalar or vector) const std::string &opt_key = kvp.second.first; + // index in the vector option, zero for scalars int opt_index = kvp.second.second; 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")); } } From db9c7bec8cd52673fac44b8b4cbe713247c14037 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 10 May 2019 17:10:12 +0200 Subject: [PATCH 2/2] Tooltip over "Remove parameter" checkbox. Application name to the "Delete all" dialog. --- src/slic3r/GUI/GUI_ObjectSettings.cpp | 1 + src/slic3r/GUI/Plater.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GUI_ObjectSettings.cpp b/src/slic3r/GUI/GUI_ObjectSettings.cpp index 8ea60cff0..5484c53f8 100644 --- a/src/slic3r/GUI/GUI_ObjectSettings.cpp +++ b/src/slic3r/GUI/GUI_ObjectSettings.cpp @@ -80,6 +80,7 @@ void ObjectSettings::update_settings_list() auto opt_key = (line.get_options())[0].opt_id; //we assume that we have one option per line auto btn = new ScalableButton(parent, wxID_ANY, m_bmp_delete); + btn->SetToolTip(_(L("Remove parameter"))); btn->Bind(wxEVT_BUTTON, [opt_key, config, this](wxEvent &event) { config->erase(opt_key); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 429827379..404456cf0 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -3338,7 +3338,7 @@ void Plater::remove(size_t obj_idx) { p->remove(obj_idx); } void Plater::reset() { p->reset(); } void Plater::reset_with_confirm() { - if (wxMessageDialog((wxWindow*)this, _(L("All objects will be removed, continue ?")), _(L("Delete all")), wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxCENTRE).ShowModal() == wxID_YES) + if (wxMessageDialog((wxWindow*)this, _(L("All objects will be removed, continue ?")), wxString(SLIC3R_APP_NAME) + " - " + _(L("Delete all")), wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxCENTRE).ShowModal() == wxID_YES) reset(); }