fix OptionRow doesn't unsubscribe to Messages

This commit is contained in:
Chris Danford
2005-02-25 06:04:31 +00:00
parent 6249b18702
commit b923311e00
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -57,15 +57,19 @@ void OptionRow::Clear()
m_Underline[p].clear(); m_Underline[p].clear();
} }
ASSERT( m_pHand == NULL );
m_bFirstItemGoesDown = false;
}
void OptionRow::DetachHandler()
{
if( m_pHand ) if( m_pHand )
{ {
FOREACH_CONST( CString, m_pHand->m_vsReloadRowMessages, m ) FOREACH_CONST( CString, m_pHand->m_vsReloadRowMessages, m )
MESSAGEMAN->Unsubscribe( this, *m ); MESSAGEMAN->Unsubscribe( this, *m );
} }
m_pHand = NULL; m_pHand = NULL;
m_bFirstItemGoesDown = false;
} }
void OptionRow::LoadNormal( const OptionRowDefinition &def, OptionRowHandler *pHand, bool bFirstItemGoesDown ) void OptionRow::LoadNormal( const OptionRowDefinition &def, OptionRowHandler *pHand, bool bFirstItemGoesDown )
+1 -1
View File
@@ -114,7 +114,7 @@ public:
float fY, float fY,
const ThemeMetric<apActorCommands> &cmdLabelOn const ThemeMetric<apActorCommands> &cmdLabelOn
); );
void DetachHandler() { m_pHand = NULL; } void DetachHandler();
void PositionUnderlines( bool bShowUnderlines, float fTweenSeconds ); void PositionUnderlines( bool bShowUnderlines, float fTweenSeconds );
void PositionIcons( const ThemeMetric1D<float> &fIconX, float fTweenSeconds ); void PositionIcons( const ThemeMetric1D<float> &fIconX, float fTweenSeconds );