From 4cb5e5e4fc7b17f1c2477bedc6f7fd979e912c58 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sat, 27 Apr 2013 22:12:30 +0200 Subject: [PATCH] CComponentsText: force text paint after hide After hide()it was not possible to paint text without forceTextPaint() and define of ct_old_text in setText() was not enough. Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/76a2c4401442c420b2b5b4d2030ecc24f5ff8722 Author: Thilo Graf Date: 2013-04-27 (Sat, 27 Apr 2013) ------------------ This commit was generated by Migit --- src/gui/components/cc_item_text.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_item_text.cpp b/src/gui/components/cc_item_text.cpp index 13d518f2f..38d5e8d90 100644 --- a/src/gui/components/cc_item_text.cpp +++ b/src/gui/components/cc_item_text.cpp @@ -140,6 +140,7 @@ void CComponentsText::initCCText() //send text to CTextBox object, but paint text only if text has changed or force option is enabled if ((ct_old_text != ct_text) || ct_force_text_paint) ct_text_sent = ct_textbox->setText(&ct_text, ct_box->iWidth); + ct_old_text = ct_text; #ifdef DEBUG_CC printf(" [CComponentsText] [%s - %d] init text: %s [x %d, y %d, h %d, w %d]\n", __FUNCTION__, __LINE__, ct_text.c_str(), ct_box->iX, ct_box->iY, height, width); #endif @@ -224,9 +225,9 @@ void CComponentsText::paint(bool do_save_bg) void CComponentsText::hide(bool no_restore) { - if (ct_textbox) ct_textbox->hide(); + ct_old_text = ""; hideCCItem(no_restore); }