Commit b4973ac0 authored by Jan Hambrecht's avatar Jan Hambrecht

fix zooming with document origin != (0,0)

svn path=/trunk/koffice/; revision=651204
parent d463255a
......@@ -34,7 +34,7 @@ m_controller(controller)
void KoZoomStrategy::finishInteraction( Qt::KeyboardModifiers modifiers )
{
QRect pixelRect = m_controller->canvas()->viewConverter()->documentToView(selectRect()).toRect();
pixelRect.translate( m_controller->canvas()->documentOrigin() );
if(pixelRect.width() > 5 && pixelRect.height() > 5)
m_controller->zoomTo(pixelRect);
else if( modifiers & Qt::ControlModifier)
......
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