From 86a236bc7eefce3b3875eeecff64978f7f291b30 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 6 Mar 2015 13:27:31 +0300 Subject: [PATCH] gui/components/cc_item_text.cpp: set CTextBox save screen flag --- src/gui/components/cc_item_text.cpp | 3 ++- src/gui/components/cc_item_text.h | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 6fc7cb9ce..0023cd578 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -62,7 +62,7 @@ CComponentsText::CComponentsText( const int x_pos, const int y_pos, const int w, CComponentsText::~CComponentsText() { - hide(); + //hide(); clearCCText(); } @@ -146,6 +146,7 @@ void CComponentsText::initCCText() ct_textbox->setTextColor(ct_col_text); ct_textbox->setWindowMaxDimensions(iWidth, iHeight); ct_textbox->setWindowMinDimensions(iWidth, iHeight); + ct_textbox->enableSaveScreen(save_tbox_screen); //observe behavior of parent form if available bool force_text_paint = ct_force_text_paint; diff --git a/src/gui/components/cc_item_text.h b/src/gui/components/cc_item_text.h index 6fc09b7be..feeda5125 100644 --- a/src/gui/components/cc_item_text.h +++ b/src/gui/components/cc_item_text.h @@ -155,6 +155,13 @@ class CComponentsText : public CComponentsItem, public CBox ///returns count of lines from a text box page virtual int getTextLinesAutoHeight(const int& textMaxHeight, const int& textWidth, const int& mode); + // overload function from cc_base CComponents + void enableTboxSaveScreen(bool mode) + { + save_tbox_screen = mode; + if (ct_textbox) + ct_textbox->enableSaveScreen(mode); + } };