diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 45ffcd599..5c70338a4 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -428,14 +428,14 @@ class CComponentsForm : public CComponentsItem std::vector v_cc_items; void paintCCItems(); void initVarForm(); - void clearCCForm(); + void clearCCItems(); public: CComponentsForm(); CComponentsForm(const int x_pos, const int y_pos, const int w, const int h); CComponentsForm(const int x_pos, const int y_pos, const int w, const int h, bool has_shadow = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUCONTENT_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); - ~CComponentsForm(); + virtual ~CComponentsForm(); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); void hide(bool no_restore = false); @@ -462,7 +462,7 @@ class CComponentsHeader : public CComponentsForm CComponentsHeader(const int x_pos, const int y_pos, const int w, const int h = 0, neutrino_locale_t caption_locale = NONEXISTANT_LOCALE, const char* icon_name = NULL, bool has_shadow = CC_SHADOW_OFF, fb_pixel_t color_frame = COL_MENUCONTENT_PLUS_6, fb_pixel_t color_body = COL_MENUHEAD_PLUS_0, fb_pixel_t color_shadow = COL_MENUCONTENTDARK_PLUS_0); - ~CComponentsHeader(); +// ~CComponentsHeader(); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); void setHeaderText(const std::string& caption); diff --git a/src/gui/components/components.cpp b/src/gui/components/components.cpp index 92bacad9e..f75bcd9e9 100644 --- a/src/gui/components/components.cpp +++ b/src/gui/components/components.cpp @@ -1516,16 +1516,20 @@ CComponentsForm::CComponentsForm(const int x_pos, const int y_pos, const int w, CComponentsForm::~CComponentsForm() { +#ifdef DEBUG_CC + printf("[CComponents] calling %s...\n", __FUNCTION__); +#endif hide(); clearSavedScreen(); - clearCCForm(); + clearCCItems(); clear(); } -void CComponentsForm::clearCCForm() +void CComponentsForm::clearCCItems() { for(size_t i=0; igetWidth(); cch_text_obj = new CComponentsText(cch_text_x, cch_items_y, width-cch_icon_obj->getWidth()-fr_thickness, height-2*fr_thickness, cch_text.c_str()); cch_text_obj->setTextFont(cch_font); @@ -1760,7 +1754,7 @@ void CComponentsHeader::paint(bool do_save_bg) //corner of text item cch_text_obj->setCornerRadius(corner_rad-fr_thickness); cch_text_obj->setCornerType(corner_type); - + //add elements addCCItem(cch_icon_obj); addCCItem(cch_text_obj);