From 094830b8a719a5ef5cc4cf916c60a215ead0da38 Mon Sep 17 00:00:00 2001 From: Jinhao Date: Wed, 13 Jun 2018 23:18:25 +0800 Subject: [PATCH] fix a bug that listbox may not be drawn(#317) it doesn't draw if the first column is wider than the width of listbox --- source/gui/widgets/listbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 7bdfc2b6..5d9140e1 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -2470,10 +2470,10 @@ namespace nana x += col.width_px; if (x > 0) { + seqs.push_back(col.index); + if (x >= static_cast(lister_w)) break; - - seqs.push_back(col.index); } } return seqs;