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();
}
ASSERT( m_pHand == NULL );
m_bFirstItemGoesDown = false;
}
void OptionRow::DetachHandler()
{
if( m_pHand )
{
FOREACH_CONST( CString, m_pHand->m_vsReloadRowMessages, m )
MESSAGEMAN->Unsubscribe( this, *m );
}
m_pHand = NULL;
m_bFirstItemGoesDown = false;
}
void OptionRow::LoadNormal( const OptionRowDefinition &def, OptionRowHandler *pHand, bool bFirstItemGoesDown )