From 7fed213ba40d6f36282b09245ea459b22d4f6c5b Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 19 Mar 2022 00:36:07 +0100 Subject: Revert "Compositor: Support backdrop offset for the Viewer node" This reverts commit 33409f9f1cd42e899f2706fe7878e5e89b50d617, as it breaks panning in the image editor. Fixes T96543 --- source/blender/editors/space_node/drawnode.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_node/drawnode.cc') diff --git a/source/blender/editors/space_node/drawnode.cc b/source/blender/editors/space_node/drawnode.cc index ad647cf019d..365a17c0a04 100644 --- a/source/blender/editors/space_node/drawnode.cc +++ b/source/blender/editors/space_node/drawnode.cc @@ -1499,10 +1499,8 @@ void draw_nodespace_back_pix(const bContext &C, if (ibuf) { /* somehow the offset has to be calculated inverse */ wmOrtho2_region_pixelspace(®ion); - const float offset_x = snode.xof + ima->display_offset_x; - const float offset_y = snode.yof + ima->display_offset_y; - const float x = (region.winx - snode.zoom * ibuf->x) / 2 + offset_x; - const float y = (region.winy - snode.zoom * ibuf->y) / 2 + offset_y; + const float x = (region.winx - snode.zoom * ibuf->x) / 2 + snode.xof; + const float y = (region.winy - snode.zoom * ibuf->y) / 2 + snode.yof; /** \note draw selected info on backdrop */ if (snode.edittree) { -- cgit v1.2.3