From f529269f6278673c120d6df8b6ad65b6477db326 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Sun, 21 Jan 2018 22:04:57 +0100 Subject: [PATCH] GCC requires explicit conversion from wxString to std::string. --- xs/src/slic3r/GUI/Field.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/slic3r/GUI/Field.cpp b/xs/src/slic3r/GUI/Field.cpp index 54cd080b43..56d3d55d5e 100644 --- a/xs/src/slic3r/GUI/Field.cpp +++ b/xs/src/slic3r/GUI/Field.cpp @@ -220,8 +220,8 @@ void SpinCtrl::BUILD() { // # gets the old one, and on_kill_focus resets the control to the old value. // # As a workaround, we get the new value from $event->GetString and store // # here temporarily so that we can return it from $self->get_value - std::string value = e.GetString(); - if (is_matched(value, "^\d+$")) + std::string value = e.GetString().utf8_str(); + if (is_matched(value, "^\\d+$")) tmp_value = std::stoi(value); on_change_field(e); // # We don't reset tmp_value here because _on_change might put callbacks