Fix preview center when tiled mode is enabled

This commit is contained in:
David Capello 2019-09-05 17:56:55 -03:00
parent 42b1154c25
commit 1c68c25594

View File

@ -1439,7 +1439,7 @@ Rect Editor::getViewportBounds()
Rect Editor::getVisibleSpriteBounds()
{
if (m_sprite)
return getViewportBounds().createIntersection(m_sprite->bounds());
return getViewportBounds().createIntersection(gfx::Rect(canvasSize()));
// This cannot happen, the sprite must be != nullptr. In old
// Aseprite versions we were using one Editor to show multiple