From 84cf3865b53ed3b15f86c6dd27bfb8fcb785a32b Mon Sep 17 00:00:00 2001 From: martii Date: Thu, 19 Jun 2014 10:01:38 +0200 Subject: [PATCH] gui/components/cc_frm_clock.cpp: add method to enable/disable auto-blit() Conflicts: src/gui/components/cc_frm_clock.cpp --- src/gui/components/cc_frm_clock.cpp | 5 +++++ src/gui/components/cc_frm_clock.h | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/gui/components/cc_frm_clock.cpp b/src/gui/components/cc_frm_clock.cpp index 465ba8f2a..c6aecd590 100644 --- a/src/gui/components/cc_frm_clock.cpp +++ b/src/gui/components/cc_frm_clock.cpp @@ -78,6 +78,8 @@ CComponentsFrmClock::CComponentsFrmClock( const int& x_pos, const int& y_pos, c activeClock = activ; + may_blit = true; + initCCLockItems(); initParent(parent); @@ -339,6 +341,9 @@ void CComponentsFrmClock::paint(bool do_save_bg) //paint form contents paintForm(do_save_bg); + + if (may_blit) + frameBuffer->blit(); } void CComponentsFrmClock::setClockFontSize(int font_size) diff --git a/src/gui/components/cc_frm_clock.h b/src/gui/components/cc_frm_clock.h index 09a0ea987..babb07e29 100644 --- a/src/gui/components/cc_frm_clock.h +++ b/src/gui/components/cc_frm_clock.h @@ -49,6 +49,7 @@ class CComponentsFrmClock : public CComponentsForm private: // bool cl_force_segment_paint; + bool may_blit; protected: ///thread @@ -141,6 +142,9 @@ class CComponentsFrmClock : public CComponentsForm ///set clock activ/inactiv virtual void setClockActiv(bool activ = true); + + ///enable/disable automatic blitting + void setBlit(bool _may_blit = true) { may_blit = _may_blit; } }; #endif