mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-28 16:01:20 +02:00
CComponentsText: remove delete of CBox() object
Obtain of one instance of CBox() should working just as like a new instance.
This commit is contained in:
@@ -118,19 +118,14 @@ void CComponentsText::initCCText()
|
|||||||
//define height from font size
|
//define height from font size
|
||||||
height = max(height, ct_font->getHeight());
|
height = max(height, ct_font->getHeight());
|
||||||
|
|
||||||
//text box dimensions
|
|
||||||
if (ct_box== NULL){
|
|
||||||
//ensure that we have a new instance
|
|
||||||
delete ct_box;
|
|
||||||
ct_box = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
//using of real x/y values to paint images if this text object is bound in a parent form
|
//using of real x/y values to paint images if this text object is bound in a parent form
|
||||||
int tx = x, ty = y;
|
int tx = x, ty = y;
|
||||||
if (cc_parent){
|
if (cc_parent){
|
||||||
tx = cc_xr;
|
tx = cc_xr;
|
||||||
ty = cc_yr;
|
ty = cc_yr;
|
||||||
}
|
}
|
||||||
|
//init text box dimensions
|
||||||
|
if (ct_box == NULL)
|
||||||
ct_box = new CBox();
|
ct_box = new CBox();
|
||||||
ct_box->iX = tx+fr_thickness;
|
ct_box->iX = tx+fr_thickness;
|
||||||
ct_box->iY = ty+fr_thickness;
|
ct_box->iY = ty+fr_thickness;
|
||||||
|
Reference in New Issue
Block a user