mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-05 23:09:04 +00:00
CHANGED: #1471 Squashed a bug that prevented text to be displayed when hardtextformat was specified as an empty string. A.K.A hidden mines in the code. There are some more :(
--HG-- branch : gsoc2012-gui-editor
This commit is contained in:
parent
d23b17f8a0
commit
152aacc41e
1 changed files with 9 additions and 1 deletions
|
@ -544,7 +544,10 @@ namespace NLGUI
|
||||||
xmlSetProp( node, BAD_CAST "clamp_right", BAD_CAST toString( _ClampRight ).c_str() );
|
xmlSetProp( node, BAD_CAST "clamp_right", BAD_CAST toString( _ClampRight ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "auto_clamp_offset", BAD_CAST toString( _AutoClampOffset ).c_str() );
|
xmlSetProp( node, BAD_CAST "auto_clamp_offset", BAD_CAST toString( _AutoClampOffset ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "continuous_update", BAD_CAST toString( _ContinuousUpdate ).c_str() );
|
xmlSetProp( node, BAD_CAST "continuous_update", BAD_CAST toString( _ContinuousUpdate ).c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "hardtext", BAD_CAST _Text.toString().c_str() );
|
|
||||||
|
std::string hs = _Text.toString();
|
||||||
|
|
||||||
|
xmlSetProp( node, BAD_CAST "hardtext", BAD_CAST hs.c_str() );
|
||||||
xmlSetProp( node, BAD_CAST "hardtext_format", BAD_CAST _HardtextFormat.c_str() );
|
xmlSetProp( node, BAD_CAST "hardtext_format", BAD_CAST _HardtextFormat.c_str() );
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
@ -2708,6 +2711,8 @@ namespace NLGUI
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
void CViewText::setTextFormatTaged(const ucstring &text)
|
void CViewText::setTextFormatTaged(const ucstring &text)
|
||||||
{
|
{
|
||||||
|
if( text.empty() )
|
||||||
|
return;
|
||||||
|
|
||||||
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
||||||
ucstring tempText;
|
ucstring tempText;
|
||||||
|
@ -2794,6 +2799,9 @@ namespace NLGUI
|
||||||
|
|
||||||
void CViewText::setSingleLineTextFormatTaged(const ucstring &text)
|
void CViewText::setSingleLineTextFormatTaged(const ucstring &text)
|
||||||
{
|
{
|
||||||
|
if( text.empty() )
|
||||||
|
return;
|
||||||
|
|
||||||
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
||||||
ucstring tempText;
|
ucstring tempText;
|
||||||
static std::vector<CFormatTag> tempLetterColors;
|
static std::vector<CFormatTag> tempLetterColors;
|
||||||
|
|
Loading…
Reference in a new issue