mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-02 09:48:14 -05:00
Decode the last folder of the open dialogs from UTF-8
The Open project, Open G-code and Load profile dialogs passed the remembered folder, a UTF-8 string, to wxWidgets as if it were in the local code page. On Windows a folder with non-ASCII characters in its name was mangled, and opening the dialog could crash. The other file dialogs already convert it with from_u8(). Ported from Snapmaker/OrcaSlicer@7f4e64294a Co-authored-by: zackaree-shen <zackary_shen@qq.com>
This commit is contained in:
1 parent
dc9ef93046
commit
2801aec81c
2 files changed
+3
-3
No files matched your search
@@ -4250,7 +4250,7 @@ void MainFrame::load_config_file()
|
||||
// if (!wxGetApp().check_and_save_current_preset_changes(_L("Loading profile file"), "", false))
|
||||
// return;
|
||||
wxFileDialog dlg(this, _L("Select profile to load:"),
|
||||
!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir(),
|
||||
from_u8(!m_last_config.IsEmpty() ? get_dir_name(m_last_config) : wxGetApp().app_config->get_last_dir()),
|
||||
"config.json", _L("Config files (*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament)|*.json;*.zip;*.orca_printer;*.orca_bundle;*.orca_filament"), wxFD_OPEN | wxFD_MULTIPLE | wxFD_FILE_MUST_EXIST);
|
||||
wxArrayString files;
|
||||
if (dlg.ShowModal() != wxID_OK)
|
||||
|
||||
Reference in new issue
Block a user