mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-01-17 13:25:41 -07:00
Fix \n not displayed (#11978)
This commit is contained in:
parent
eac352f95d
commit
97c8da4d03
1 changed files with 8 additions and 1 deletions
|
|
@ -710,6 +710,13 @@ void TextCtrl::BUILD() {
|
|||
const ConfigOptionStrings *vec = m_opt.get_default_value<ConfigOptionStrings>();
|
||||
if (vec == nullptr || vec->empty()) break; //for the case of empty default value
|
||||
text_value = vec->get_at(m_opt_idx);
|
||||
// For multiline fields, unescape newlines and other escape sequences
|
||||
if (m_opt.multiline) {
|
||||
std::string unescaped_value;
|
||||
if (unescape_string_cstyle(text_value.ToStdString(), unescaped_value)) {
|
||||
text_value = wxString::FromUTF8(unescaped_value);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case coPoint:
|
||||
|
|
@ -731,7 +738,7 @@ void TextCtrl::BUILD() {
|
|||
: builder2.build(m_parent, "", "", "", wxDefaultPosition, size, wxTE_PROCESS_ENTER);
|
||||
temp->SetLabel(_L(m_opt.sidetext));
|
||||
auto text_ctrl = m_opt.multiline ? (wxTextCtrl *)temp : ((TextInput *) temp)->GetTextCtrl();
|
||||
text_ctrl->SetLabel(text_value);
|
||||
text_ctrl->SetValue(text_value);
|
||||
temp->SetSize(size);
|
||||
m_combine_side_text = !m_opt.multiline;
|
||||
if (parent_is_custom_ctrl && m_opt.height < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue