mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +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,20 +118,15 @@ void CComponentsText::initCCText()
|
||||
//define height from font size
|
||||
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
|
||||
int tx = x, ty = y;
|
||||
if (cc_parent){
|
||||
tx = cc_xr;
|
||||
ty = cc_yr;
|
||||
}
|
||||
ct_box = new CBox();
|
||||
//init text box dimensions
|
||||
if (ct_box == NULL)
|
||||
ct_box = new CBox();
|
||||
ct_box->iX = tx+fr_thickness;
|
||||
ct_box->iY = ty+fr_thickness;
|
||||
ct_box->iWidth = width-2*fr_thickness;
|
||||
|
Reference in New Issue
Block a user