From b9b749832efb23e4960e2f6c338a500a541ae308 Mon Sep 17 00:00:00 2001 From: qPCR4vir Date: Tue, 16 Feb 2016 12:58:35 +0100 Subject: [PATCH] fix: to_nstring in tabbar --- include/nana/gui/widgets/tabbar.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/nana/gui/widgets/tabbar.hpp b/include/nana/gui/widgets/tabbar.hpp index 2a8d9692..b7a88789 100644 --- a/include/nana/gui/widgets/tabbar.hpp +++ b/include/nana/gui/widgets/tabbar.hpp @@ -261,7 +261,8 @@ namespace nana return this->get_drawer_trigger().length(); } - tabbar& append(std::string text, window attach_wd, value_type value = {}) + /// Append a new tab + tabbar& append(std::string text, window attach_wd, value_type value = {}) // 2x text convertion. maybe better to duplicate code? { return this->append( static_cast(nana::charset(std::move(text), nana::unicode::utf8)), attach_wd, std::move(value)); } @@ -271,7 +272,7 @@ namespace nana if (attach_wd && API::empty_window(attach_wd)) throw std::invalid_argument("Appening a tab to a tabbar - error: tabbar.attach: invalid window handle"); - this->get_drawer_trigger().insert(::nana::npos, std::move(text), std::move(value)); + this->get_drawer_trigger().insert(::nana::npos, to_nstring(std::move(text)), std::move(value)); if (attach_wd) this->attach(this->get_drawer_trigger().length() - 1, attach_wd);