Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 60d8a814 authored by Adrian Page's avatar Adrian Page

Fix paint problems when zoomed in.

svn path=/trunk/koffice/; revision=663994
parent 28e41092
......@@ -105,7 +105,7 @@ void KisOpenGLCanvas2::resizeGL(int w, int h)
void KisOpenGLCanvas2::paintGL()
{
kDebug() << "paintGL\n";
// kDebug() << "paintGL\n";
QColor widgetBackgroundColor = palette().color(QPalette::Mid);
......@@ -115,7 +115,6 @@ void KisOpenGLCanvas2::paintGL()
KisImageSP img = m_d->canvas->image();
if ( !img ) return;
QRect vr = QRect(0, 0, width(), height());
// Zoom factor
double sx, sy;
......@@ -187,7 +186,8 @@ void KisOpenGLCanvas2::paintGL()
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
QRect wr = toAlignedRect( m_d->viewConverter->viewToDocument( QRectF( 0, 0, width(), height() ) ) );
QRectF documentRect = m_d->viewConverter->viewToDocument( QRectF( m_d->documentOffset.x(), m_d->documentOffset.y(), width(), height() ) );
QRect wr = img->documentToIntPixel(documentRect);
wr &= QRect(0, 0, img->width(), img->height());
m_d->openGLImageContext->setHDRExposure(m_d->canvas->view()->resourceProvider()->HDRExposure());
......
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