diff options
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/name_format_editor.cc | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/wx/name_format_editor.cc b/src/wx/name_format_editor.cc index 166b0e145..ce0760486 100644 --- a/src/wx/name_format_editor.cc +++ b/src/wx/name_format_editor.cc @@ -73,20 +73,18 @@ NameFormatEditor::changed () void NameFormatEditor::update_example () { - if (_examples.empty ()) { - return; - } - _name.set_specification(wx_to_std(_specification->GetValue())); - auto example = wxString::Format(_("e.g. %s"), std_to_wx(careful_string_filter(_name.get(_examples, _suffix)))); - wxString wrapped; - for (size_t i = 0; i < example.Length(); ++i) { - if (i > 0 && (i % 40) == 0) { - wrapped += char_to_wx("\n"); + if (!_examples.empty()) { + auto example = wxString::Format(_("e.g. %s"), std_to_wx(careful_string_filter(_name.get(_examples, _suffix)))); + wxString wrapped; + for (size_t i = 0; i < example.Length(); ++i) { + if (i > 0 && (i % 40) == 0) { + wrapped += char_to_wx("\n"); + } + wrapped += example[i]; } - wrapped += example[i]; - } - _example->SetLabel (wrapped); + _example->SetLabel(wrapped); + } } |
