#4864 - Fixed collapse sidebar using Shift+Tab

This commit is contained in:
enricoturri1966 2020-10-13 11:31:12 +02:00
parent f0de7f13fc
commit e3e74f4ae0
2 changed files with 43 additions and 43 deletions

View File

@ -67,8 +67,7 @@ KBShortcutsDialog::KBShortcutsDialog()
main_sizer->Add(book, 1, wxEXPAND | wxALL, 10); main_sizer->Add(book, 1, wxEXPAND | wxALL, 10);
fill_shortcuts(); fill_shortcuts();
for (size_t i = 0; i < m_full_shortcuts.size(); ++i) for (size_t i = 0; i < m_full_shortcuts.size(); ++i) {
{
wxPanel* page = create_page(book, m_full_shortcuts[i], font, bold_font); wxPanel* page = create_page(book, m_full_shortcuts[i], font, bold_font);
m_pages.push_back(page); m_pages.push_back(page);
book->AddPage(page, m_full_shortcuts[i].first, i == 0); book->AddPage(page, m_full_shortcuts[i].first, i == 0);
@ -140,8 +139,6 @@ void KBShortcutsDialog::fill_shortcuts()
// View // View
{ "0-6", L("Camera view") }, { "0-6", L("Camera view") },
{ "E", L("Show/Hide object/instance labels") }, { "E", L("Show/Hide object/instance labels") },
{ "Tab", L("Switch between Editor/Preview") },
{ "Shift+Tab", L("Collapse/Expand the sidebar") },
// Configuration // Configuration
{ ctrl + "P", L("Preferences") }, { ctrl + "P", L("Preferences") },
// Help // Help
@ -179,6 +176,8 @@ void KBShortcutsDialog::fill_shortcuts()
{ "Z", L("Zoom to selected object\nor all objects in scene, if none selected") }, { "Z", L("Zoom to selected object\nor all objects in scene, if none selected") },
{ "I", L("Zoom in") }, { "I", L("Zoom in") },
{ "O", L("Zoom out") }, { "O", L("Zoom out") },
{ "Tab", L("Switch between Editor/Preview") },
{ "Shift+Tab", L("Collapse/Expand the sidebar") },
#ifdef __linux__ #ifdef __linux__
{ ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog") }, { ctrl + "M", L("Show/Hide 3Dconnexion devices settings dialog") },
#endif // __linux__ #endif // __linux__
@ -286,22 +285,23 @@ wxPanel* KBShortcutsDialog::create_page(wxWindow* parent, const std::pair<wxStri
wxFlexGridSizer* grid_sizer = new wxFlexGridSizer(2 * columns_count, 5, 15); wxFlexGridSizer* grid_sizer = new wxFlexGridSizer(2 * columns_count, 5, 15);
int items_count = (int)shortcuts.second.size(); int items_count = (int)shortcuts.second.size();
for (int i = 0; i < max_items_per_column; ++i) for (int i = 0; i < max_items_per_column; ++i) {
{ for (int j = 0; j < columns_count; ++j) {
for (int j = 0; j < columns_count; ++j)
{
int id = j * max_items_per_column + i; int id = j * max_items_per_column + i;
if (id >= items_count) if (id < items_count) {
break; const auto& [shortcut, description] = shortcuts.second[id];
auto key = new wxStaticText(page, wxID_ANY, _(shortcut));
key->SetFont(bold_font);
grid_sizer->Add(key, 0, wxALIGN_CENTRE_VERTICAL);
const auto& [shortcut, description] = shortcuts.second[id]; auto desc = new wxStaticText(page, wxID_ANY, _(description));
auto key = new wxStaticText(page, wxID_ANY, _(shortcut)); desc->SetFont(font);
key->SetFont(bold_font); grid_sizer->Add(desc, 0, wxALIGN_CENTRE_VERTICAL);
grid_sizer->Add(key, 0, wxALIGN_CENTRE_VERTICAL); }
else {
auto desc = new wxStaticText(page, wxID_ANY, _(description)); grid_sizer->Add(new wxStaticText(page, wxID_ANY, ""), 0, wxALIGN_CENTRE_VERTICAL);
desc->SetFont(font); grid_sizer->Add(new wxStaticText(page, wxID_ANY, ""), 0, wxALIGN_CENTRE_VERTICAL);
grid_sizer->Add(desc, 0, wxALIGN_CENTRE_VERTICAL); }
} }
} }

View File

@ -73,7 +73,7 @@ public:
//int id; //int id;
//auto *item = menu->Append(id = wxNewId(), "&Test menu"); //auto *item = menu->Append(id = wxNewId(), "&Test menu");
//menu->Bind(wxEVT_MENU, [this](wxCommandEvent &) { wxMessageBox("Test menu - GCode Viewer"); }, id); //menu->Bind(wxEVT_MENU, [this](wxCommandEvent &) { wxMessageBox("Test menu - GCode Viewer"); }, id);
append_menu_item(menu, wxID_ANY, _(L("Open PrusaSlicer")), _(L("")), append_menu_item(menu, wxID_ANY, _L("Open PrusaSlicer"), _L(""),
[this](wxCommandEvent&) { start_new_slicer(nullptr, true); }, "", nullptr); [this](wxCommandEvent&) { start_new_slicer(nullptr, true); }, "", nullptr);
return menu; return menu;
} }
@ -906,7 +906,7 @@ static wxMenu* generate_help_menu()
wxMenu* helpMenu = new wxMenu(); wxMenu* helpMenu = new wxMenu();
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"),
[](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/downloads"); }); [](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/downloads"); });
append_menu_item(helpMenu, wxID_ANY, _(L("Software &Releases")), _(L("Open the software releases page in your browser")), append_menu_item(helpMenu, wxID_ANY, _L("Software &Releases"), _L("Open the software releases page in your browser"),
[](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/PrusaSlicer/releases"); }); [](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/PrusaSlicer/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);
@ -915,15 +915,15 @@ static wxMenu* generate_help_menu()
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Website"), SLIC3R_APP_NAME), append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Website"), SLIC3R_APP_NAME),
wxString::Format(_L("Open the %s website in your browser"), SLIC3R_APP_NAME), wxString::Format(_L("Open the %s website in your browser"), SLIC3R_APP_NAME),
[](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); }); [](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); });
// append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME), // append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Manual"), SLIC3R_APP_NAME),
// wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME), // wxString::Format(_L("Open the %s manual in your browser"), SLIC3R_APP_NAME),
// [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); }); // [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); });
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
append_menu_item(helpMenu, wxID_ANY, _L("System &Info"), _L("Show system information"), append_menu_item(helpMenu, wxID_ANY, _L("System &Info"), _L("Show system information"),
[](wxCommandEvent&) { wxGetApp().system_info(); }); [](wxCommandEvent&) { wxGetApp().system_info(); });
append_menu_item(helpMenu, wxID_ANY, _L("Show &Configuration Folder"), _L("Show user configuration folder (datadir)"), append_menu_item(helpMenu, wxID_ANY, _L("Show &Configuration Folder"), _L("Show user configuration folder (datadir)"),
[](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); }); [](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); });
append_menu_item(helpMenu, wxID_ANY, _(L"Report an I&ssue"), wxString::Format(_L("Report an issue on %s"), SLIC3R_APP_NAME), append_menu_item(helpMenu, wxID_ANY, _L("Report an I&ssue"), wxString::Format(_L("Report an issue on %s"), SLIC3R_APP_NAME),
[](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/slic3r/issues/new"); }); [](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/slic3r/issues/new"); });
#if ENABLE_GCODE_VIEWER #if ENABLE_GCODE_VIEWER
if (wxGetApp().is_editor()) if (wxGetApp().is_editor())
@ -1257,7 +1257,7 @@ void MainFrame::init_menubar()
[this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "upload_queue", nullptr, []() {return true; }, this); [this](wxCommandEvent&) { m_printhost_queue_dlg->Show(); }, "upload_queue", nullptr, []() {return true; }, this);
windowMenu->AppendSeparator(); windowMenu->AppendSeparator();
append_menu_item(windowMenu, wxID_ANY, _(L("Open new instance")) + "\tCtrl+I", _(L("Open a new PrusaSlicer instance")), append_menu_item(windowMenu, wxID_ANY, _L("Open new instance") + "\tCtrl+I", _L("Open a new PrusaSlicer instance"),
[this](wxCommandEvent&) { start_new_slicer(); }, "", nullptr, [this]() {return m_plater != nullptr && wxGetApp().app_config->get("single_instance") != "1"; }, this); [this](wxCommandEvent&) { start_new_slicer(); }, "", nullptr, [this]() {return m_plater != nullptr && wxGetApp().app_config->get("single_instance") != "1"; }, this);
} }
@ -1292,7 +1292,7 @@ void MainFrame::init_menubar()
append_menu_check_item(viewMenu, wxID_ANY, _L("Show &labels") + sep + "E", _L("Show object/instance labels in 3D scene"), append_menu_check_item(viewMenu, wxID_ANY, _L("Show &labels") + sep + "E", _L("Show object/instance labels in 3D scene"),
[this](wxCommandEvent&) { m_plater->show_view3D_labels(!m_plater->are_view3D_labels_shown()); }, this, [this](wxCommandEvent&) { m_plater->show_view3D_labels(!m_plater->are_view3D_labels_shown()); }, this,
[this]() { return m_plater->is_view3D_shown(); }, [this]() { return m_plater->are_view3D_labels_shown(); }, this); [this]() { return m_plater->is_view3D_shown(); }, [this]() { return m_plater->are_view3D_labels_shown(); }, this);
append_menu_check_item(viewMenu, wxID_ANY, _L("&Collapse sidebar") + sep + "Shift+Tab", _L("Collapse sidebar"), append_menu_check_item(viewMenu, wxID_ANY, _L("&Collapse sidebar"), _L("Collapse sidebar"),
[this](wxCommandEvent&) { m_plater->collapse_sidebar(!m_plater->is_sidebar_collapsed()); }, this, [this](wxCommandEvent&) { m_plater->collapse_sidebar(!m_plater->is_sidebar_collapsed()); }, this,
[]() { return true; }, [this]() { return m_plater->is_sidebar_collapsed(); }, this); []() { return true; }, [this]() { return m_plater->is_sidebar_collapsed(); }, this);
} }
@ -1314,8 +1314,8 @@ void MainFrame::init_menubar()
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Website"), SLIC3R_APP_NAME), append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Website"), SLIC3R_APP_NAME),
wxString::Format(_L("Open the %s website in your browser"), SLIC3R_APP_NAME), wxString::Format(_L("Open the %s website in your browser"), SLIC3R_APP_NAME),
[this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); }); [this](wxCommandEvent&) { wxGetApp().open_web_page_localized("https://www.prusa3d.com/slicerweb"); });
// append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("%s &Manual")), SLIC3R_APP_NAME), // append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("%s &Manual"), SLIC3R_APP_NAME),
// wxString::Format(_(L("Open the %s manual in your browser")), SLIC3R_APP_NAME), // wxString::Format(_L("Open the %s manual in your browser"), SLIC3R_APP_NAME),
// [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); }); // [this](wxCommandEvent&) { wxLaunchDefaultBrowser("http://manual.slic3r.org/"); });
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
append_menu_item(helpMenu, wxID_ANY, _L("System &Info"), _L("Show system information"), append_menu_item(helpMenu, wxID_ANY, _L("System &Info"), _L("Show system information"),
@ -1324,7 +1324,7 @@ void MainFrame::init_menubar()
[this](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); }); [this](wxCommandEvent&) { Slic3r::GUI::desktop_open_datadir_folder(); });
append_menu_item(helpMenu, wxID_ANY, _L("Report an I&ssue"), wxString::Format(_L("Report an issue on %s"), SLIC3R_APP_NAME), append_menu_item(helpMenu, wxID_ANY, _L("Report an I&ssue"), wxString::Format(_L("Report an issue on %s"), SLIC3R_APP_NAME),
[this](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/slic3r/issues/new"); }); [this](wxCommandEvent&) { wxLaunchDefaultBrowser("https://github.com/prusa3d/slic3r/issues/new"); });
append_menu_item(helpMenu, wxID_ANY, wxString::Format(_(L("&About %s")), SLIC3R_APP_NAME), _(L("Show about dialog")), append_menu_item(helpMenu, wxID_ANY, wxString::Format(_L("&About %s"), SLIC3R_APP_NAME), _L("Show about dialog"),
[this](wxCommandEvent&) { Slic3r::GUI::about(); }); [this](wxCommandEvent&) { Slic3r::GUI::about(); });
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "&?", _L("Show the list of the keyboard shortcuts"), append_menu_item(helpMenu, wxID_ANY, _L("Keyboard Shortcuts") + sep + "&?", _L("Show the list of the keyboard shortcuts"),
@ -1469,7 +1469,7 @@ void MainFrame::quick_slice(const int qs)
// select input file // select input file
if (!(qs & qsReslice)) { if (!(qs & qsReslice)) {
wxFileDialog dlg(this, _(L("Choose a file to slice (STL/OBJ/AMF/3MF/PRUSA):")), wxFileDialog dlg(this, _L("Choose a file to slice (STL/OBJ/AMF/3MF/PRUSA):"),
wxGetApp().app_config->get_last_dir(), "", wxGetApp().app_config->get_last_dir(), "",
file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST); file_wildcards(FT_MODEL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dlg.ShowModal() != wxID_OK) if (dlg.ShowModal() != wxID_OK)
@ -1480,14 +1480,14 @@ void MainFrame::quick_slice(const int qs)
} }
else { else {
if (m_qs_last_input_file.IsEmpty()) { if (m_qs_last_input_file.IsEmpty()) {
wxMessageDialog dlg(this, _(L("No previously sliced file.")), wxMessageDialog dlg(this, _L("No previously sliced file."),
_(L("Error")), wxICON_ERROR | wxOK); _L("Error"), wxICON_ERROR | wxOK);
dlg.ShowModal(); dlg.ShowModal();
return; return;
} }
if (std::ifstream(m_qs_last_input_file.ToUTF8().data())) { if (std::ifstream(m_qs_last_input_file.ToUTF8().data())) {
wxMessageDialog dlg(this, _(L("Previously sliced file ("))+m_qs_last_input_file+_(L(") not found.")), wxMessageDialog dlg(this, _L("Previously sliced file (")+m_qs_last_input_file+_L(") not found."),
_(L("File Not Found")), wxICON_ERROR | wxOK); _L("File Not Found"), wxICON_ERROR | wxOK);
dlg.ShowModal(); dlg.ShowModal();
return; return;
} }
@ -1522,7 +1522,7 @@ void MainFrame::quick_slice(const int qs)
} }
else if (qs & qsSaveAs) { else if (qs & qsSaveAs) {
// The following line may die if the output_filename_format template substitution fails. // The following line may die if the output_filename_format template substitution fails.
wxFileDialog dlg(this, from_u8((boost::format(_utf8(L("Save %s file as:"))) % ((qs & qsExportSVG) ? _(L("SVG")) : _(L("G-code")))).str()), wxFileDialog dlg(this, from_u8((boost::format(_utf8(L("Save %s file as:"))) % ((qs & qsExportSVG) ? _L("SVG") : _L("G-code"))).str()),
wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)), get_base_name(input_file), wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)), get_base_name(input_file),
qs & qsExportSVG ? file_wildcards(FT_SVG) : file_wildcards(FT_GCODE), qs & qsExportSVG ? file_wildcards(FT_SVG) : file_wildcards(FT_GCODE),
wxFD_SAVE | wxFD_OVERWRITE_PROMPT); wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
@ -1534,7 +1534,7 @@ void MainFrame::quick_slice(const int qs)
wxGetApp().app_config->update_last_output_dir(get_dir_name(output_file)); wxGetApp().app_config->update_last_output_dir(get_dir_name(output_file));
} }
else if (qs & qsExportPNG) { else if (qs & qsExportPNG) {
wxFileDialog dlg(this, _(L("Save zip file as:")), wxFileDialog dlg(this, _L("Save zip file as:"),
wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)), wxGetApp().app_config->get_last_output_dir(get_dir_name(output_file)),
get_base_name(output_file), "*.sl1", wxFD_SAVE | wxFD_OVERWRITE_PROMPT); get_base_name(output_file), "*.sl1", wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
if (dlg.ShowModal() != wxID_OK) if (dlg.ShowModal() != wxID_OK)
@ -1568,9 +1568,9 @@ void MainFrame::quick_slice(const int qs)
m_progress_dialog->Destroy(); m_progress_dialog->Destroy();
m_progress_dialog = nullptr; m_progress_dialog = nullptr;
auto message = input_file_basename + _(L(" was successfully sliced.")); auto message = input_file_basename + _L(" was successfully sliced.");
// wxTheApp->notify(message); // wxTheApp->notify(message);
wxMessageDialog(this, message, _(L("Slicing Done!")), wxOK | wxICON_INFORMATION).ShowModal(); wxMessageDialog(this, message, _L("Slicing Done!"), wxOK | wxICON_INFORMATION).ShowModal();
// }; // };
// Slic3r::GUI::catch_error(this, []() { if (m_progress_dialog) m_progress_dialog->Destroy(); }); // Slic3r::GUI::catch_error(this, []() { if (m_progress_dialog) m_progress_dialog->Destroy(); });
} }
@ -1585,7 +1585,7 @@ void MainFrame::repair_stl()
{ {
wxString input_file; wxString input_file;
{ {
wxFileDialog dlg(this, _(L("Select the STL file to repair:")), wxFileDialog dlg(this, _L("Select the STL file to repair:"),
wxGetApp().app_config->get_last_dir(), "", wxGetApp().app_config->get_last_dir(), "",
file_wildcards(FT_STL), wxFD_OPEN | wxFD_FILE_MUST_EXIST); file_wildcards(FT_STL), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dlg.ShowModal() != wxID_OK) if (dlg.ShowModal() != wxID_OK)
@ -1621,7 +1621,7 @@ void MainFrame::export_config()
return; return;
} }
// Ask user for the file name for the config file. // Ask user for the file name for the config file.
wxFileDialog dlg(this, _(L("Save configuration as:")), wxFileDialog dlg(this, _L("Save configuration as:"),
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
!m_last_config.IsEmpty() ? get_base_name(m_last_config) : "config.ini", !m_last_config.IsEmpty() ? get_base_name(m_last_config) : "config.ini",
file_wildcards(FT_INI), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); file_wildcards(FT_INI), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
@ -1640,7 +1640,7 @@ void MainFrame::load_config_file()
{ {
if (!wxGetApp().check_unsaved_changes()) if (!wxGetApp().check_unsaved_changes())
return; return;
wxFileDialog dlg(this, _(L("Select configuration to load:")), wxFileDialog dlg(this, _L("Select configuration to load:"),
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
"config.ini", "INI files (*.ini, *.gcode)|*.ini;*.INI;*.gcode;*.g", wxFD_OPEN | wxFD_FILE_MUST_EXIST); "config.ini", "INI files (*.ini, *.gcode)|*.ini;*.INI;*.gcode;*.g", wxFD_OPEN | wxFD_FILE_MUST_EXIST);
wxString file; wxString file;
@ -1676,7 +1676,7 @@ void MainFrame::export_configbundle(bool export_physical_printers /*= false*/)
return; return;
} }
// Ask user for a file name. // Ask user for a file name.
wxFileDialog dlg(this, _(L("Save presets bundle as:")), wxFileDialog dlg(this, _L("Save presets bundle as:"),
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
SLIC3R_APP_KEY "_config_bundle.ini", SLIC3R_APP_KEY "_config_bundle.ini",
file_wildcards(FT_INI), wxFD_SAVE | wxFD_OVERWRITE_PROMPT); file_wildcards(FT_INI), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
@ -1702,7 +1702,7 @@ void MainFrame::load_configbundle(wxString file/* = wxEmptyString, const bool re
if (!wxGetApp().check_unsaved_changes()) if (!wxGetApp().check_unsaved_changes())
return; return;
if (file.IsEmpty()) { if (file.IsEmpty()) {
wxFileDialog dlg(this, _(L("Select configuration to load:")), wxFileDialog dlg(this, _L("Select configuration to load:"),
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(), !m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
"config.ini", file_wildcards(FT_INI), wxFD_OPEN | wxFD_FILE_MUST_EXIST); "config.ini", file_wildcards(FT_INI), wxFD_OPEN | wxFD_FILE_MUST_EXIST);
if (dlg.ShowModal() != wxID_OK) if (dlg.ShowModal() != wxID_OK)
@ -1723,7 +1723,7 @@ void MainFrame::load_configbundle(wxString file/* = wxEmptyString, const bool re
// Load the currently selected preset into the GUI, update the preset selection box. // Load the currently selected preset into the GUI, update the preset selection box.
wxGetApp().load_current_presets(); wxGetApp().load_current_presets();
const auto message = wxString::Format(_(L("%d presets successfully imported.")), presets_imported); const auto message = wxString::Format(_L("%d presets successfully imported."), presets_imported);
Slic3r::GUI::show_info(this, message, wxString("Info")); Slic3r::GUI::show_info(this, message, wxString("Info"));
} }