From 32335423091a0fd27dd9bfa14b7d5eeb58049504 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Thu, 29 Aug 2013 14:36:57 -0400 Subject: [PATCH] fix hack regarding ModIcons and Lua option rows Since the ModIcon is copied from the option row type, make sure we actually copy everything it'll need, since Load() isn't called again. --- src/ModIcon.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ModIcon.cpp b/src/ModIcon.cpp index 6d359046e7..6bab84fc52 100644 --- a/src/ModIcon.cpp +++ b/src/ModIcon.cpp @@ -13,7 +13,10 @@ ModIcon::ModIcon( const ModIcon &cpy ): ActorFrame(cpy), m_text(cpy.m_text), m_sprFilled(cpy.m_sprFilled), - m_sprEmpty(cpy.m_sprEmpty) + m_sprEmpty(cpy.m_sprEmpty), + m_vStopWords(cpy.m_vStopWords), + STOP_WORDS(cpy.STOP_WORDS), + CROP_TEXT_TO_WIDTH(cpy.CROP_TEXT_TO_WIDTH) { this->RemoveAllChildren(); this->AddChild( m_sprFilled ); @@ -63,8 +66,7 @@ void ModIcon::Set( const RString &_sText ) m_sprEmpty->SetVisible( bVacant ); 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 ); } /*