Fixed bugs and memory leak

This commit is contained in:
CaiWenzhi 2014-01-06 15:07:04 +08:00
parent 63fbec05e9
commit 4d1d225bd1
2 changed files with 3 additions and 2 deletions

View File

@ -85,6 +85,7 @@ _currentAlphaTestRef(1)
Layout::~Layout()
{
setClippingEnabled(false);
}
void Layout::onEnter()

View File

@ -140,13 +140,11 @@ void Text::setScale(float fScale)
void Text::setScaleX(float fScaleX)
{
Widget::setScaleX(fScaleX);
_normalScaleValueX = fScaleX;
}
void Text::setScaleY(float fScaleY)
{
Widget::setScaleY(fScaleY);
_normalScaleValueY = fScaleY;
}
bool Text::isTouchScaleChangeEnabled()
@ -169,6 +167,8 @@ void Text::onPressStateChangedToPressed()
{
return;
}
_normalScaleValueX = getScaleX();
_normalScaleValueY = getScaleY();
clickScale(_normalScaleValueX + _onSelectedScaleOffset, _normalScaleValueY + _onSelectedScaleOffset);
}