Fix #105363: Frame nodes can act wrong in transform system #105400
|
@ -48,11 +48,11 @@ static void create_transform_data_for_node(TransData &td,
|
|||
|
||||
/* account for parents (nested nodes) */
|
||||
if (node.parent) {
|
||||
nodeToView(node.parent, node.locx, node.locy, &locx, &locy);
|
||||
nodeToView(node.parent, node.locx + node.offsetx, node.locy + node.offsety, &locx, &locy);
|
||||
}
|
||||
else {
|
||||
locx = node.locx;
|
||||
locy = node.locy;
|
||||
locx = node.locx + node.offsetx;
|
||||
locy = node.locy + node.offsety;
|
||||
}
|
||||
mod_moder marked this conversation as resolved
|
||||
|
||||
/* use top-left corner as the transform origin for nodes */
|
||||
|
@ -244,11 +244,16 @@ static void flushTransNodes(TransInfo *t)
|
|||
|
||||
/* account for parents (nested nodes) */
|
||||
if (node->parent) {
|
||||
nodeFromView(node->parent, loc[0], loc[1], &loc[0], &loc[1]);
|
||||
nodeFromView(node->parent,
|
||||
loc[0] - node->offsetx,
|
||||
loc[1] - node->offsety,
|
||||
&node->locx,
|
||||
&node->locy);
|
||||
}
|
||||
else {
|
||||
node->locx = loc[0] - node->offsetx;
|
||||
node->locy = loc[1] - node->offsety;
|
||||
}
|
||||
|
||||
node->locx = loc[0];
|
||||
node->locy = loc[1];
|
||||
}
|
||||
|
||||
/* handle intersection with noodles */
|
||||
|
|
Loading…
Reference in New Issue
This looks strange. The parent check already happens in the
nodeToView
implementation. The whole if can be replaced withSame for
nodeFromView
belowYeah, could be done, the
nodeFromView
case would need a bit of additional tweaking, but as you also mentioned, would keep the cleanup separate from the fix here.