mirror of https://github.com/aseprite/aseprite.git
Fix pivot position when Tiled Mode is enabled (fix #2316)
This commit is contained in:
parent
002356ce19
commit
2db193b8e3
|
@ -1,5 +1,5 @@
|
||||||
// Aseprite
|
// Aseprite
|
||||||
// Copyright (C) 2020-2022 Igara Studio S.A.
|
// Copyright (C) 2020-2025 Igara Studio S.A.
|
||||||
// Copyright (C) 2001-2017 David Capello
|
// Copyright (C) 2001-2017 David Capello
|
||||||
//
|
//
|
||||||
// This program is distributed under the terms of
|
// This program is distributed under the terms of
|
||||||
|
@ -209,7 +209,8 @@ gfx::Rect TransformHandles::getPivotHandleBounds(Editor* editor,
|
||||||
{
|
{
|
||||||
auto theme = SkinTheme::get(editor);
|
auto theme = SkinTheme::get(editor);
|
||||||
gfx::Size partSize = theme->parts.pivotHandle()->size();
|
gfx::Size partSize = theme->parts.pivotHandle()->size();
|
||||||
gfx::Point screenPivotPos = editor->editorToScreen(gfx::Point(transform.pivot()));
|
gfx::Point pivotPos = gfx::Point(transform.pivot()) + editor->mainTilePosition();
|
||||||
|
gfx::Point screenPivotPos = editor->editorToScreen(pivotPos);
|
||||||
|
|
||||||
screenPivotPos.x += editor->projection().applyX(1) / 2;
|
screenPivotPos.x += editor->projection().applyX(1) / 2;
|
||||||
screenPivotPos.y += editor->projection().applyY(1) / 2;
|
screenPivotPos.y += editor->projection().applyY(1) / 2;
|
||||||
|
|
Loading…
Reference in New Issue