+ } else {
+ // The secondary view is active, hence from a users point of view
+ // the content of the secondary view should be moved to the primary view.
+ // From an implementation point of view it is more efficient to close
+ // the primary view and exchange the internal pointers afterwards.
+ m_viewContainer[PrimaryView]->close();
+ m_viewContainer[PrimaryView]->deleteLater();
+ m_viewContainer[PrimaryView] = m_viewContainer[SecondaryView];
+ m_viewContainer[SecondaryView] = 0;