From e5b0673259426b5c32b6f4ea9830798541fd59d8 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 10 Nov 2013 14:48:19 +0100 Subject: [PATCH] CComponents: add log warning if position = 0 Value 0 for embedded items should be unproblematic, buy single items should have minimum value = 1. --- src/gui/components/cc_base.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/components/cc_base.cpp b/src/gui/components/cc_base.cpp index db8fed84f..38a015017 100644 --- a/src/gui/components/cc_base.cpp +++ b/src/gui/components/cc_base.cpp @@ -107,8 +107,13 @@ void CComponents::paintFbItems(bool do_save_bg) for(size_t i=0; i< v_fbdata.size() ;i++){ // Don't paint if dx or dy are 0 - if ((v_fbdata[i].dx == 0) || (v_fbdata[i].dy == 0)) + if ((v_fbdata[i].dx == 0) || (v_fbdata[i].dy == 0)){ + printf(" [CComponents] WARNING:\n [%s - %d], dx = %d\n dy = %d\n", __FUNCTION__, __LINE__, v_fbdata[i].dx, v_fbdata[i].dy); continue; + } + if ((v_fbdata[i].x == 0) || (v_fbdata[i].y == 0)){ + printf(" [CComponents] WARNING:\n [%s - %d], x = %d\n y = %d\n", __FUNCTION__, __LINE__, v_fbdata[i].x, v_fbdata[i].y); + } int fbtype = v_fbdata[i].fbdata_type; #ifdef DEBUG_CC