When pasting components into a circuit (especially after copying from another circuit where the components are placed at odd locations, e.g. far away from 0,0), it can happen that the pasted components are not visible in the current zoom/pan area. The user is then confused and probably repeats the paste action, leading to a second set of the same components stacked upon the first set.
To avoid this, perform a pan animation to the pasted components if their bounding box is not contained in the currently displayed area of the target circuit.
When pasting components into a circuit (especially after copying from another circuit where the components are placed at odd locations, e.g. far away from 0,0), it can happen that the pasted components are not visible in the current zoom/pan area. The user is then confused and probably repeats the paste action, leading to a second set of the same components stacked upon the first set.
To avoid this, perform a pan animation to the pasted components if their bounding box is not contained in the currently displayed area of the target circuit.