From 41f29c9f0919ac53412428635ccda2e2009d5e81 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Wed, 15 May 2019 12:30:06 +0200 Subject: [PATCH] Fix of #2237 --- src/slic3r/GUI/Field.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Field.cpp b/src/slic3r/GUI/Field.cpp index e3a9bb2c7..e7bdd1e6b 100644 --- a/src/slic3r/GUI/Field.cpp +++ b/src/slic3r/GUI/Field.cpp @@ -520,8 +520,14 @@ void SpinCtrl::BUILD() { // Forcibly set the input value for SpinControl, since the value // inserted from the clipboard is not updated under OSX - if (tmp_value > -9999) - dynamic_cast(window)->SetValue(tmp_value); + if (tmp_value > -9999) { + wxSpinCtrl* spin = dynamic_cast(window); + spin->SetValue(tmp_value); + + // But in SetValue() is executed m_text_ctrl->SelectAll(), so + // discard this selection and set insertion point to the end of string + spin->GetText()->SetInsertionPointEnd(); + } #endif }), temp->GetId());