now that I know this causes a crash in certain situations, document it.
This commit is contained in:
+8
-1
@@ -35,6 +35,12 @@ void ModIcon::Load( RString sMetricsGroup )
|
|||||||
this->AddChild( &m_text );
|
this->AddChild( &m_text );
|
||||||
|
|
||||||
CROP_TEXT_TO_WIDTH.Load( sMetricsGroup, "CropTextToWidth" );
|
CROP_TEXT_TO_WIDTH.Load( sMetricsGroup, "CropTextToWidth" );
|
||||||
|
// stop words
|
||||||
|
/*
|
||||||
|
STOP_WORDS.Load( sMetricsGroup, "StopWords" );
|
||||||
|
m_vStopWords.empty();
|
||||||
|
split(STOP_WORDS, ",", m_vStopWords);
|
||||||
|
*/
|
||||||
|
|
||||||
Set("");
|
Set("");
|
||||||
}
|
}
|
||||||
@@ -43,7 +49,7 @@ void ModIcon::Set( const RString &_sText )
|
|||||||
{
|
{
|
||||||
RString sText = _sText;
|
RString sText = _sText;
|
||||||
|
|
||||||
// todo: make these metricable? -aj
|
// todo: make these metricable -aj
|
||||||
static const RString sStopWords[] =
|
static const RString sStopWords[] =
|
||||||
{
|
{
|
||||||
"1X",
|
"1X",
|
||||||
@@ -63,6 +69,7 @@ void ModIcon::Set( const RString &_sText )
|
|||||||
m_sprEmpty->SetVisible( bVacant );
|
m_sprEmpty->SetVisible( bVacant );
|
||||||
|
|
||||||
m_text.SetText( sText );
|
m_text.SetText( sText );
|
||||||
|
// This line makes Lua option rows crash: -aj
|
||||||
m_text.CropToWidth( CROP_TEXT_TO_WIDTH );
|
m_text.CropToWidth( CROP_TEXT_TO_WIDTH );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user