mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-22 12:32:17 -07:00
FIX: fix crash when the preset name has Chinese characters
jira: STUDIO-9096 Change-Id: I8925a9ed5c39c52515a581bd824fa57bd6823164 (cherry picked from commit 901a3bf66610cc901b9f368b31383baec02127d8)
This commit is contained in:
parent
1d32826aa5
commit
048f91be5c
1 changed files with 4 additions and 4 deletions
|
|
@ -310,19 +310,19 @@ wxString PresetComboBox::get_preset_item_name(unsigned int index)
|
|||
if (m_type == Preset::TYPE_PRINTER) {
|
||||
int idx = selected_connected_printer();
|
||||
if (idx < 0) {
|
||||
return GetString(index).ToUTF8().data();
|
||||
return GetString(index);
|
||||
}
|
||||
else {
|
||||
DeviceManager *dev = Slic3r::GUI::wxGetApp().getDeviceManager();
|
||||
if (!dev) {
|
||||
assert(false);
|
||||
return GetString(index).ToUTF8().data();
|
||||
return GetString(index);
|
||||
}
|
||||
|
||||
std::map<std::string, MachineObject *> machine_list = dev->get_my_machine_list();
|
||||
if (machine_list.empty()) {
|
||||
assert(false);
|
||||
return GetString(index).ToUTF8().data();
|
||||
return GetString(index);
|
||||
}
|
||||
|
||||
auto iter = machine_list.begin();
|
||||
|
|
@ -334,7 +334,7 @@ wxString PresetComboBox::get_preset_item_name(unsigned int index)
|
|||
}
|
||||
}
|
||||
|
||||
return GetString(index).ToUTF8().data();
|
||||
return GetString(index);
|
||||
}
|
||||
|
||||
wxString PresetComboBox::get_preset_name(const Preset & preset)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue