Fix #106097: Don't offset child nodes when pasting #106099
|
@ -263,8 +263,11 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
|
|||
const float2 offset = (mouse_location - center) / UI_DPI_FAC;
|
||||
|
||||
for (bNode *new_node : node_map.values()) {
|
||||
new_node->locx += offset.x;
|
||||
new_node->locy += offset.y;
|
||||
/* Skip the offset for parented nodes since the location is in parent space. */
|
||||
if (new_node->parent == nullptr) {
|
||||
new_node->locx += offset.x;
|
||||
new_node->locy += offset.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue