mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-25 08:36:14 +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 :(
This commit is contained in:
parent
bf21525a4f
commit
61959db760
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 "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 "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() );
|
||||
|
||||
return node;
|
||||
|
@ -2708,6 +2711,8 @@ namespace NLGUI
|
|||
// ***************************************************************************
|
||||
void CViewText::setTextFormatTaged(const ucstring &text)
|
||||
{
|
||||
if( text.empty() )
|
||||
return;
|
||||
|
||||
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
||||
ucstring tempText;
|
||||
|
@ -2794,6 +2799,9 @@ namespace NLGUI
|
|||
|
||||
void CViewText::setSingleLineTextFormatTaged(const ucstring &text)
|
||||
{
|
||||
if( text.empty() )
|
||||
return;
|
||||
|
||||
// to allow cache (avoid infinite recurse in updateCoords() in some case), compute in temp
|
||||
ucstring tempText;
|
||||
static std::vector<CFormatTag> tempLetterColors;
|
||||
|
|
Loading…
Reference in a new issue