Sketcher: Carbon Copy repeated multiple times on drag
- Dominant language
- C++
- Stars
- 33.6k
- Forks
- 6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [X] I have searched the existing issues
### Full version info
```shell
OS: Windows 11 build 22621
Word size of FreeCAD: 64-bit
Version: 0.21.0.33668 +7 (Git)
Build type: Release
Branch: (HEAD detached at 0.21)
Hash: 41b058e2087de60dc8fef3d3e68c7d0129e13abf
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: English/United Kingdom (en_GB)
Installed mods:
* 3DfindIT 1.2.0
* Assembly4 0.12.5
* Curves 0.6.6
* freecad.gears 1.0.0
* lattice2 1.0.0
* Manipulator 1.5.0
* Pyramids-and-Polyhedrons
* sheetmetal 0.2.61
```
### Subproject(s) affected?
Sketcher
### Problem description
With the Carbon Copy tool selected, accidentally dragging the mouse while selecting another sketch in the Combo View results in the elements of that sketch being imported multiple times.
To replicate:
1. Select File -> New
2. Switch to Sketcher workbench
3. Create a sketch, on the XY plane, and add a rectangle (any size, doesn't matter). Close the sketch. This will be called `Sketch`.
4. Deselect `Sketch` if it's selected, and create another one on the XY plane. This will be called `Sketch001`.
5. Select `Sketch` -> Sketcher geometries -> Create carbon copy
6. Switch to the Model tab in the Combo View
7. Now: mouse down on the `Sketch` name in the Combo View, and without releasing the mouse button, move the pointer horizontally. It doesn't need to be by much, just enough to register a mouse move event. Release the mouse button.
8. Switch back to the Task tab in the Combo View, and have a look at how many lines have been created.
When I do that, I get some random multiple of 4 lines created in `Sketch001`.
This is, for some reason, very easy to trigger with my hardware. Discussion (such as it is) [here](https://forum.freecad.org/viewtopic.php?t=80446&start=10).
### Anything else?
_No response_
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.