From d386400d1c302450ac20f25ec46192b123d04a9c Mon Sep 17 00:00:00 2001 From: Jinhao Date: Fri, 5 May 2017 04:47:43 +0800 Subject: [PATCH] fix issue that place may break the visibility of tab panels --- source/gui/place.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/gui/place.cpp b/source/gui/place.cpp index ff446802..c0a4f972 100644 --- a/source/gui/place.cpp +++ b/source/gui/place.cpp @@ -632,13 +632,16 @@ namespace nana API::umake_event(e.evt_destroy); } - void visible(bool vsb) + void visible(bool vsb, bool sync_fastened = true) { for (auto & e : elements) API::show_window(e.handle, vsb); - for (auto & e : fastened) - API::show_window(e.handle, vsb); + if (sync_fastened) + { + for (auto & e : fastened) + API::show_window(e.handle, vsb); + } } static event_handle erase_element(std::vector& elements, window handle) noexcept @@ -2571,7 +2574,10 @@ namespace nana } } - field.second->visible(is_show); + //Collocate doesn't sync the visiblity of fastened windows. + //This is a feature that allows tabbar panels to be fastened to a same field, the collocate() + //shouldn't break the visibility of panels that are maintained by tabbar. + field.second->visible(is_show, false); } } }