From 2b284c09786f471853319287b37c6463c5fa66ad Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 12 May 2013 14:16:51 +0200 Subject: [PATCH] CComponents: fix missing save of background in paint_bg=false mode Exit in initVarItem() on !paint_bg was too early. Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9ae72bf02d469a84391815af521d2fd083521966 Author: Thilo Graf Date: 2013-05-12 (Sun, 12 May 2013) --- src/gui/components/cc_base.cpp | 7 ++++++- src/gui/components/cc_item.cpp | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index 30c84dea8..777015ee0 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -83,6 +83,7 @@ void CComponents::initVarBasic() //paint framebuffer stuff and fill buffer void CComponents::paintFbItems(bool do_save_bg) { + //save background before first paint, do_save_bg must be true if (firstPaint && do_save_bg) { for(size_t i=0; i 0) frameBuffer->paintBoxFrame(v_fbdata[i].x, v_fbdata[i].y, v_fbdata[i].dx, v_fbdata[i].dy, v_fbdata[i].frame_thickness, v_fbdata[i].color, v_fbdata[i].r); diff --git a/src/gui/components/cc_item.cpp b/src/gui/components/cc_item.cpp index a50375d10..0e9985814 100644 --- a/src/gui/components/cc_item.cpp +++ b/src/gui/components/cc_item.cpp @@ -67,9 +67,6 @@ void CComponentsItem::paintInit(bool do_save_bg) { clear(); - if(!paint_bg) - return; - int sw = shadow ? shadow_w : 0; int th = fr_thickness; fb_pixel_t col_frame_cur = col_frame;