From 4c3455648f7ed44f7eb62d3578ee0f83801bcb2b Mon Sep 17 00:00:00 2001 From: besh81 Date: Tue, 8 Jan 2019 17:31:39 +0100 Subject: [PATCH] spinbox: if not editable keep prefix and suffix when gain focus --- source/gui/widgets/spinbox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/gui/widgets/spinbox.cpp b/source/gui/widgets/spinbox.cpp index 6ed1f3ed..49ae0347 100644 --- a/source/gui/widgets/spinbox.cpp +++ b/source/gui/widgets/spinbox.cpp @@ -467,7 +467,7 @@ namespace nana std::wstring text; - if (API::is_focus_ready(editor_->window_handle())) + if (API::is_focus_ready(editor_->window_handle()) && editor_->attr().editable) text = to_wstring(range_->value()); else text = to_wstring(modifier_.prefix + range_->value() + modifier_.suffix);