From 8f0e45cf6aa6a49da5e1b59c2df6d2e9cb7787b9 Mon Sep 17 00:00:00 2001 From: mae <qt-info@nokia.com> Date: Thu, 11 Jun 2009 14:31:40 +0200 Subject: [PATCH] make sure there is always a correct current view --- src/plugins/coreplugin/editormanager/editormanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index e7e717d3352..ac7882e096c 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -539,7 +539,9 @@ Core::Internal::SplitterOrView *EditorManager::currentView() const { SplitterOrView *view = m_d->m_currentView; if (!view) - view = m_d->m_splitter->findView(m_d->m_currentEditor); + view = m_d->m_currentEditor? + m_d->m_splitter->findView(m_d->m_currentEditor): + m_d->m_splitter->findFirstView(); return view; } -- GitLab