Commit 6b704a4b authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix brush outline jumps when switching between documents of different zoom

BUG:427094
parent f6913ae9
......@@ -521,6 +521,7 @@ void KisViewManager::setCurrentView(KisView *view)
d->currentImageView->notifyCurrentStateChanged(true);
d->currentImageView->canvasController()->activate();
d->currentImageView->canvasController()->setFocus();
d->currentImageView->zoomManager()->updateCurrentZoomResource();
d->viewConnections.addUniqueConnection(
image(), SIGNAL(sigSizeChanged(QPointF,QPointF)),
......
......@@ -223,6 +223,14 @@ void KisZoomManager::updateImageBoundsSnapping()
}
}
void KisZoomManager::updateCurrentZoomResource()
{
const qreal effectiveZoom =
m_view->canvasBase()->coordinatesConverter()->effectiveZoom();
m_view->canvasBase()->resourceManager()->setResource(KoCanvasResource::EffectiveZoom, effectiveZoom);
}
void KisZoomManager::updateMouseTrackingConnections()
{
bool value = m_horizontalRuler->isVisible() &&
......@@ -329,7 +337,7 @@ void KisZoomManager::slotUpdateGuiAfterZoomChange()
QIcon(), 500, KisFloatingMessage::Low, Qt::AlignCenter);
}
updateCurrentZoomResource();
m_view->canvasBase()->resourceManager()->setResource(KoCanvasResource::EffectiveZoom, effectiveZoom);
}
......
......@@ -65,6 +65,7 @@ public:
}
void updateImageBoundsSnapping();
void updateCurrentZoomResource();
QWidget *zoomActionWidget() const;
......
Supports Markdown
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