From 85c2bdbd75586dac58b1626c9fbc39e2bfaaa27e Mon Sep 17 00:00:00 2001 From: Jinhao Date: Sat, 2 Feb 2019 00:31:56 +0800 Subject: [PATCH] small changes --- source/gui/widgets/checkbox.cpp | 2 +- source/gui/widgets/listbox.cpp | 4 ++-- source/gui/widgets/spinbox.cpp | 2 +- source/gui/widgets/treebox.cpp | 2 ++ 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/gui/widgets/checkbox.cpp b/source/gui/widgets/checkbox.cpp index 3148ee88..fc08fcac 100644 --- a/source/gui/widgets/checkbox.cpp +++ b/source/gui/widgets/checkbox.cpp @@ -1,7 +1,7 @@ /* * A CheckBox Implementation * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/gui/widgets/listbox.cpp b/source/gui/widgets/listbox.cpp index 895b2829..13baf15a 100644 --- a/source/gui/widgets/listbox.cpp +++ b/source/gui/widgets/listbox.cpp @@ -6197,8 +6197,8 @@ namespace nana for(size_type i=first_col; i<=last_col; ++i) new_idx.push_back(i); internal_scope_guard lock; - const item_proxy ip_row = this->at(row); - const nana::any *pnany=_m_ess().lister.anyobj(row,false); + auto ip_row = this->at(row); + auto pnany=_m_ess().lister.anyobj(row,false); std::sort(new_idx.begin(), new_idx.end(), [&](size_type col1, size_type col2) { diff --git a/source/gui/widgets/spinbox.cpp b/source/gui/widgets/spinbox.cpp index 49ae0347..4a631c2c 100644 --- a/source/gui/widgets/spinbox.cpp +++ b/source/gui/widgets/spinbox.cpp @@ -1,7 +1,7 @@ /* * A Spin box widget * Nana C++ Library(http://www.nanapro.org) - * Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com) + * Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com) * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp index 4181177e..e5be4dcd 100644 --- a/source/gui/widgets/treebox.cpp +++ b/source/gui/widgets/treebox.cpp @@ -1966,6 +1966,8 @@ namespace nana void trigger::detached() { + //Reset the comp_placer, because after deteching, the scheme refered by comp_placer will be released + impl_->data.comp_placer.reset(); impl_->data.graph = nullptr; }