diff --git a/src/plugins/coreplugin/editormanager/editormanager.cpp b/src/plugins/coreplugin/editormanager/editormanager.cpp index 12a31c7e988..dd7b7d18365 100644 --- a/src/plugins/coreplugin/editormanager/editormanager.cpp +++ b/src/plugins/coreplugin/editormanager/editormanager.cpp @@ -554,13 +554,11 @@ IEditor *EditorManager::currentEditor() const return m_d->m_currentEditor; } - void EditorManager::emptyView(Core::Internal::EditorView *view) { if (!view) return; - QList editors = view->editors(); foreach (IEditor *editor, editors) { if (!m_d->m_editorModel->isDuplicate(editor)) { diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp index ea9b2ff1648..6a69fc24204 100644 --- a/src/plugins/coreplugin/editormanager/editorview.cpp +++ b/src/plugins/coreplugin/editormanager/editorview.cpp @@ -650,11 +650,14 @@ void SplitterOrView::mousePressEvent(QMouseEvent *e) void SplitterOrView::paintEvent(QPaintEvent *) { - if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this) + if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this) return; - QPainter painter(this); - // Discreet indication where an editor would be + if (!m_view || hasEditors()) + return; + + // Discreet indication where an editor would be if there is none + QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing, true); painter.setPen(Qt::NoPen); QColor shadeBrush(Qt::black);