From db0591a5db53dcb7158df6e6649a06fbf90f595f Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Sat, 25 Apr 2015 21:39:09 +0200 Subject: [PATCH] allow programmatically export an arbitrary set of columns --- source/gui/widgets/listbox.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 482e8e9c..1310c1f8 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -350,16 +350,20 @@ namespace nana nana::string head_str; bool first{true}; for( size_type idx{}; idxvisible || ! exp_opt.only_visible_columns); + + if(first) + first=false; + else head_str += exp_opt.sep; - head_str += cont()[idx].text; + head_str += col->text; } return head_str; } @@ -3358,7 +3362,7 @@ namespace nana exp_opt.columns_order = essence_->header.all_headers(true); exp_opt.only_selected_items = true; nana::system::dataexch().set(essence_->to_string(exp_opt)); - return; + return; } default: return;