CComponentsShapeSircle: fix segfault on init

This commit is contained in:
2012-09-01 23:35:17 +02:00
parent 2126bbda81
commit 4b1d9ca213
2 changed files with 28 additions and 3 deletions

View File

@@ -389,4 +389,16 @@ class CComponentsTitleBar : public CComponentsItemBox
}; };
class CComponentsForm : public CComponentsContainer
{
private:
public:
CComponentsForm();
void paint(bool do_save_bg = CC_SAVE_SCREEN_YES);
};
#endif #endif

View File

@@ -455,8 +455,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
//CComponents //CComponents
x = x_pos; x = x_pos;
y = y_pos; y = y_pos;
width = d; //width = height = d = diam;
height = d;
shadow = has_shadow; shadow = has_shadow;
shadow_w = SHADOW_OFFSET; shadow_w = SHADOW_OFFSET;
col_frame = color_frame; col_frame = color_frame;
@@ -467,7 +466,7 @@ CComponentsShapeCircle::CComponentsShapeCircle( int x_pos, int y_pos, int diam,
bgMode = CC_BGMODE_PERMANENT; bgMode = CC_BGMODE_PERMANENT;
//CComponentsShapeCircle //CComponentsShapeCircle
d = diam; width = height = d = diam;
//CComponentsContainer //CComponentsContainer
corner_rad = d/2; corner_rad = d/2;
@@ -1314,3 +1313,17 @@ void CComponentsTitleBar::paint(bool do_save_bg)
paintItemBox(do_save_bg); paintItemBox(do_save_bg);
} }
//-------------------------------------------------------------------------------------------------------
//sub class CComponentsForm from CComponentsItemBox
CComponentsForm::CComponentsForm()
{
//CComponentsContainer
initVarContainer();
}
void CComponentsForm::paint(bool do_save_bg)
{
paintInit(do_save_bg);
}