Commit 0f6f1f42 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer

Fixed painting glitch visible on Windows

Creator would get darker and darker when dragging or clicking the mouse.
Don't paint the editor indicator when there is no view or the view has
editors.

Reviewed-by: mae
Reviewed-by: Daniel Molkentin
parent 1fd9ebfc
......@@ -554,13 +554,11 @@ IEditor *EditorManager::currentEditor() const
return m_d->m_currentEditor;
}
void EditorManager::emptyView(Core::Internal::EditorView *view)
{
if (!view)
return;
QList<IEditor *> editors = view->editors();
foreach (IEditor *editor, editors) {
if (!m_d->m_editorModel->isDuplicate(editor)) {
......
......@@ -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;
if (!m_view || hasEditors())
return;
QPainter painter(this);
// Discreet indication where an editor would be
// 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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment