From 93df609520ff395d6a4d465f6b2e4d799bb9885b Mon Sep 17 00:00:00 2001 From: Jinhao Date: Fri, 14 Dec 2018 07:14:04 +0800 Subject: [PATCH] fix bug that label renders an additional endline(#365) --- source/gui/widgets/label.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/source/gui/widgets/label.cpp b/source/gui/widgets/label.cpp index 74bedf81..3095ec56 100644 --- a/source/gui/widgets/label.cpp +++ b/source/gui/widgets/label.cpp @@ -130,7 +130,7 @@ namespace nana if (!_m_foreach_visual_line(graph, rs)) break; - rs.pos.y += static_cast(rs.vslines.back().extent_height_px); + //Now the y-position of rs has been modified to next line. } if (transient_.current_font != pre_font) @@ -531,10 +531,6 @@ namespace nana bool _m_foreach_visual_line(graph_reference graph, render_status& rs) { - std::wstring text; - - content_element_iterator block_start; - auto const bottom = static_cast(graph.height()) - 1; for (auto & vsline : rs.vslines)