PhysicalPrinterDialog: Remove all leading and trailing spaces from "print_host" input
This commit is contained in:
parent
4f1a092ae0
commit
1b49dd9869
1 changed files with 6 additions and 0 deletions
|
@ -434,6 +434,12 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
|
||||||
e.Skip();
|
e.Skip();
|
||||||
temp->GetToolTip()->Enable(true);
|
temp->GetToolTip()->Enable(true);
|
||||||
#endif // __WXGTK__
|
#endif // __WXGTK__
|
||||||
|
// Remove all leading and trailing spaces from the input
|
||||||
|
std::string trimed_str, str = trimed_str = temp->GetValue().ToStdString();
|
||||||
|
boost::trim(trimed_str);
|
||||||
|
if (trimed_str != str)
|
||||||
|
temp->SetValue(trimed_str);
|
||||||
|
|
||||||
TextCtrl* field = dynamic_cast<TextCtrl*>(printhost_field);
|
TextCtrl* field = dynamic_cast<TextCtrl*>(printhost_field);
|
||||||
if (field)
|
if (field)
|
||||||
field->propagate_value();
|
field->propagate_value();
|
||||||
|
|
Loading…
Add table
Reference in a new issue