From 39fb9f47f4c55e4165df685944048feb22eed2d1 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Fri, 15 Dec 2017 18:01:03 +0100 Subject: [PATCH] CComponentsFooter: fix force re init of button container clear() removes only items and their instances inside button container, but all other properties (e.g. width) are not touched. Re init should avoids this. --- src/gui/components/cc_frm_footer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/components/cc_frm_footer.cpp b/src/gui/components/cc_frm_footer.cpp index 00cdf49df..88e8589a2 100644 --- a/src/gui/components/cc_frm_footer.cpp +++ b/src/gui/components/cc_frm_footer.cpp @@ -107,8 +107,10 @@ void CComponentsFooter::initVarFooter( const int& x_pos, const int& y_pos, const void CComponentsFooter::setButtonLabels(const struct button_label_cc * const content, const size_t& label_count, const int& chain_width, const int& label_width) { /* clean up before init */ - if (btn_container) - btn_container->clear(); + if (btn_container){ + removeCCItem(btn_container); + btn_container = NULL; + } if (label_count == 0) return;