GraphiteEditor / GraphiteEditor/Graphite

Edit->Duplicate in the node graph makes extra duplicates of reused input nodes

Ouverte
#2,501 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Good First Issue
Langage dominant
Rust
Étoiles
27.2k
Forks
1.3k
Merge moyen
20 h 5 min
PR mergées (30 j)
57

Description

**Repro steps:**

1. Create a project with one Text node supplying input to two layers (or use the attached project).
2. Drag-select the two layers and their input nodes.
* In the attached project, use the bottom two layers, with the text "Shut up and take my money!"
3. Choose Edit -> Duplicate.
* It seems necessary to use the menu option, NOT the Ctrl-D keyboard shortcut, as odd as that sounds.

**Expected result:** The selected nodes are duplicated exactly once, adding two new layers.

**Observed result:** In _addition_ to the expected result, we now have one copy of the original Text node for each of the original two layers. This is almost impossible to notice since they overlap perfectly. See below for a more detailed explanation.

**Suggested fix:**
* Don't make extra copies of the re-used input nodes.
* For extra points, systemically prevent the case of nodes ever having exactly the same x and y coordinates in the node graph. When this happens it is REALLY confusing.

**Details:** In the attached project, I was attempting to create a "shadow" or outline for some meme text, using multiple layers. I reused the Text and Transform nodes for both layers using the node graph editor (see screenshot).

Later, I wanted a second line of text, so I box-selected my two layers and their input nodes and chose Edit -> Duplicate. This mostly worked, apart from some messed up wiring.

Even later, I tried to edit the top line of text and was confused as to why my edits were applying only to the white text and not the black text shadow:

![Image](https://github.com/user-attachments/assets/904f87c5-8d33-46a0-99dd-699a6133ac06)

Eventually I realised the topmost Text node is actually TWO Text nodes, perfectly overlapping so it's impossible to see. Here I've moved them slightly to demonstrate (note, the graph structure is identical to the above image):

![Image](https://github.com/user-attachments/assets/5f3b362d-a90b-4aab-a663-9cdfca864d2d)

I can reproduce this by similarly duplicating the bottom two layers with the text "Shut up and take my money".

[invalidate-cache.zip](https://github.com/user-attachments/files/19523590/invalidate-cache.zip)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.