forked from qt-creator/qt-creator
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
This commit is contained in:
@@ -554,13 +554,11 @@ IEditor *EditorManager::currentEditor() const
|
|||||||
return m_d->m_currentEditor;
|
return m_d->m_currentEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void EditorManager::emptyView(Core::Internal::EditorView *view)
|
void EditorManager::emptyView(Core::Internal::EditorView *view)
|
||||||
{
|
{
|
||||||
if (!view)
|
if (!view)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
QList<IEditor *> editors = view->editors();
|
QList<IEditor *> editors = view->editors();
|
||||||
foreach (IEditor *editor, editors) {
|
foreach (IEditor *editor, editors) {
|
||||||
if (!m_d->m_editorModel->isDuplicate(editor)) {
|
if (!m_d->m_editorModel->isDuplicate(editor)) {
|
||||||
|
@@ -650,11 +650,14 @@ void SplitterOrView::mousePressEvent(QMouseEvent *e)
|
|||||||
|
|
||||||
void SplitterOrView::paintEvent(QPaintEvent *)
|
void SplitterOrView::paintEvent(QPaintEvent *)
|
||||||
{
|
{
|
||||||
if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
|
if (CoreImpl::instance()->editorManager()->currentSplitterOrView() != this)
|
||||||
return;
|
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.setRenderHint(QPainter::Antialiasing, true);
|
||||||
painter.setPen(Qt::NoPen);
|
painter.setPen(Qt::NoPen);
|
||||||
QColor shadeBrush(Qt::black);
|
QColor shadeBrush(Qt::black);
|
||||||
|
Reference in New Issue
Block a user