- [self finishAnimation:animation];
-}
-
-- (void)finishAnimation:(NSAnimation *)animation
-{
- if ( m_show )
- {
- // the window expects to be sent a size event when it is shown normally
- // and so it should also get one when it is shown with effect
- m_win->SendSizeEvent();
- }
- else // window was being hidden
- {
- // NSViewAnimation is smart enough to hide the NSView itself but we
- // also need to ensure that it's considered to be hidden at wx level
- m_win->Hide();
-
- // and we also need to restore its original size which was changed by
- // the animation
- m_win->SetSize(m_origRect.x, m_origRect.y, m_origRect.w, m_origRect.h);
- }
-
- wxNSViewAnimations::iterator it = gs_activeAnimations.find(m_win);
- wxASSERT_MSG( it != gs_activeAnimations.end() && it->second == animation,
- "corrupted active animations list?" );
-
- gs_activeAnimations.erase(it);
-
- // we don't dare to release it immediately as we're called from its code
- // but schedule the animation itself for deletion soon
- [animation autorelease];
-
- // ensure that this delegate is definitely not needed any more before
- // destroying it
- [animation setDelegate:nil];
- [self release];