Page MenuHomePhabricator

IZombieViewPart's ActivatedZombieView is never called by QmitkViewCoordinator
Closed, WontfixPublic

Description

The only location where ActivatedZombieView() is possibly called is
QmitkViewCoordinator.cpp(98)

To do so, there must be a valid m_ActiveZombieView (line 95). However, the only location where m_ActiveZombieView is set to something else than 0, is in line 99. But this will never happen, because it is in the same scope as the call to ActivatedZombieView().

Suggested Fix:
if (mitk::IZombieViewPart* zombieView = dynamic_cast<mitk::IZombieViewPart*>(part))
{

if (m_ActiveZombieView && (m_ActiveZombieView != zombieView))
{
  // Another zombie view has been activated. Tell the old one about it.
  m_ActiveZombieView->ActivatedZombieView(partRef);    
}
m_ActiveZombieView = zombieView;

}

Additionally, the destructor of mitk::IZombieViewPart must make sure that QmitkViewCoordinator's m_ActiveZombieView will be set to zero if it is being deleted.

Event Timeline

kislinsk claimed this task.
kislinsk added a subscriber: kislinsk.
This task was automatically closed because it wasn't updated at least since July 2016 (over 2 years). Please re-open this task if you think that it is still relevant. This most probably means that you will resolve it.