From 6835dc611c6a3f943afe9b1c99eb1111452a250d Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Mon, 19 Nov 2012 17:12:41 +0100 Subject: [PATCH] CComponentsHeader: move init members into its own member Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/562b091e668667d23229f7575fd42276114e14c9 Author: Thilo Graf Date: 2012-11-19 (Mon, 19 Nov 2012) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/components/cc.h | 1 + src/gui/components/components.cpp | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index cbe1cf194..9bc7776d0 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -501,6 +501,7 @@ class CComponentsHeader : public CComponentsForm void initCCHeaderIcon(); void initCCHeaderText(); void initCCHeaderButtons(); + void initCCHItems(); protected: void initVarHeader(); diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index c3c0e3b5f..a1087eb49 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -1832,14 +1832,8 @@ void CComponentsHeader::initCCHeaderText() } -void CComponentsHeader::paint(bool do_save_bg) +void CComponentsHeader::initCCHItems() { - //paint body - paintInit(do_save_bg); - - //clean up first possible old item objects, includes delete and clean up vector - clearCCItems(); - //init icon initCCHeaderIcon(); @@ -1848,7 +1842,7 @@ void CComponentsHeader::paint(bool do_save_bg) //init buttons initCCHeaderButtons(); - + //add elements if (cch_icon_obj) addCCItem(cch_icon_obj); //icon @@ -1856,6 +1850,18 @@ void CComponentsHeader::paint(bool do_save_bg) addCCItem(cch_text_obj); //text if (cch_btn_obj) addCCItem(cch_btn_obj); //buttons +} + +void CComponentsHeader::paint(bool do_save_bg) +{ + //paint body + paintInit(do_save_bg); + + //clean up first possible old item objects, includes delete and clean up vector + clearCCItems(); + + //init default header ccitems + initCCHItems(); //paint paintCCItems();