From 98483d3e40a494e6982ff652fde060ee94b8d327 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Mon, 18 Jul 2016 02:36:18 +0800 Subject: [PATCH] fix crash in linux because of compiler bug(GCC 4.8) --- source/gui/widgets/skeletons/text_editor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/gui/widgets/skeletons/text_editor.cpp b/source/gui/widgets/skeletons/text_editor.cpp index d989cc83..0fe8e573 100644 --- a/source/gui/widgets/skeletons/text_editor.cpp +++ b/source/gui/widgets/skeletons/text_editor.cpp @@ -3158,8 +3158,8 @@ namespace nana{ namespace widgets graph_( graph ), editor_( editor ), parser_( parser ), - selection_fgcolor_{ selection_fgcolor }, - selection_bgcolor_{ selection_bgcolor }, + selection_fgcolor_( selection_fgcolor ), + selection_bgcolor_( selection_bgcolor ), line_px_( editor.line_height() ) {} @@ -3196,6 +3196,7 @@ namespace nana{ namespace widgets void text_editor::_m_draw_string(int top, const ::nana::color& clr, const nana::upoint& text_coord, const std::wstring& text, bool if_mask) const { + point text_draw_pos{ text_area_.area.x - points_.offset.x, top }; const int text_right = text_area_.area.right();