View Issue Details

IDProjectCategoryView StatusLast Update
0002304DraftBugpublic2018-12-19 21:04
ReporterjmaustpcAssigned Toyorik 
PrioritylowSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platform64 bitOSKubuntuOS Version14.04
Product Version0.16 
Target Version0.18Fixed in Version0.18 
Summary0002304: Duplicate multi selection of sketch element produces many sketches
DescriptionForum topic
http://forum.freecadweb.org/viewtopic.php?f=10&t=12927

if you create a sketch, then with it not in edit mode, you multi select several edges and then do any of
1) Edit menu... Duplicate selection
2) Draft ...Clone
3)Part... Simple copy

The result is multiple sketches.

Additional InformationOS: Kubuntu 14.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5764 (Git)
Build type: Release
Branch: master
Hash: eff27994e57bc1eb07af8f378d1b85e3b635e194
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
TagsClone

Activities

Kunda1

2017-01-28 12:16

manager   ~0008049

Confirmed in the forum

wmayer

2017-10-01 20:13

administrator   ~0010230

https://github.com/FreeCAD/FreeCAD/commit/ce559a4643e5f2437d11b0063819fc462f566fb0 fixes creation of simple copies. Duplicate selection was fixed in the past.

wmayer

2017-10-18 18:49

administrator   ~0010320

it's now a pure Draft issue since the bugs in core an Part module are fixed.

damian

2017-11-17 22:55

reporter   ~0010424

Last edited: 2017-11-18 09:51

View 6 revisions

DraftTools.py
line 4861

[code=python]nonRepeatList = []
for obj in FreeCADGui.Selection.getSelection():
    if obj not in nonRepeatList:
        FreeCADGui.doCommand("Draft.clone(FreeCAD.ActiveDocument."+obj.Name+")")
        nonRepeatList.insert(0, obj)
[/code]
Kunda edit: https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Draft/DraftTools.py#L4861

Kunda1

2017-11-18 08:49

manager   ~0010425

@damian are you offering a fix here ?

damian

2017-11-18 09:59

reporter   ~0010426

Yes, a fix. But there are others commands involved, like Mirror. It's possible to do a more general Draft function (consolideteSelection, for example) and apply it to every command which has the same problem
PD: I don't achieve a good management of this editor Note, the indentation is terrible.

Kunda1

2017-11-19 15:38

manager   ~0010430

@kkremitzki the indentation issue of ~10424 is this a result of disabling that that other plugin thing? (sorry for the vague reference)

kkremitzki

2017-11-20 05:36

administrator   ~0010434

@Kunda1 No idea, what indentation issue exactly?

Kunda1

2018-01-24 20:43

manager   ~0010845

@kkremitzki oh sorry, missed your reply. See https://freecadweb.org/tracker/bug_revision_view_page.php?bugnote_id=10424
The last line of the python code is not indented.

yorik

2018-12-05 13:07

administrator   ~0012238

This fix is now applied with https://git.io/fpX5d
Currently only in Draft Clone, I'll keep this open to check other tools

yorik

2018-12-17 14:37

administrator   ~0012292

I think if several subobjects of a same object are selected, Gui.Selection.getSelection() should contain the object only once... I don't think any part of FreeCAD will expect the object to be duplicated in the list... What do you think @wmayer ?

But it might be best to do this after the release, to not potentially disrupt anything

wmayer

2018-12-19 19:40

administrator   ~0012319

Yes, it makes sense to avoid duplicates when only returning the document objects.

wmayer

2018-12-19 20:19

administrator   ~0012320

https://github.com/FreeCAD/FreeCAD/commit/0556a2ca68e9fb171807a9c6fcb3c13939a251ef

yorik

2018-12-19 21:04

administrator   ~0012322

Thanks for the fix!

Issue History

Date Modified Username Field Change
2015-10-22 13:23 jmaustpc New Issue
2016-01-19 01:55 yorik Target Version 0.16 =>
2017-01-28 12:16 Kunda1 Note Added: 0008049
2017-01-28 12:16 Kunda1 Status new => confirmed
2017-01-28 12:16 Kunda1 Additional Information Updated View Revisions
2017-05-31 04:20 Kunda1 Tag Attached: Clone
2017-09-15 20:32 wmayer Target Version => 0.17
2017-10-01 20:13 wmayer Note Added: 0010230
2017-10-18 18:48 wmayer Project FreeCAD => Draft
2017-10-18 18:49 wmayer Note Added: 0010320
2017-11-17 22:55 damian Note Added: 0010424
2017-11-18 00:53 Kunda1 Note Edited: 0010424 View Revisions
2017-11-18 00:54 Kunda1 Note Edited: 0010424 View Revisions
2017-11-18 00:56 Kunda1 Note Edited: 0010424 View Revisions
2017-11-18 08:49 Kunda1 Note Added: 0010425
2017-11-18 09:23 damian Note Edited: 0010424 View Revisions
2017-11-18 09:51 damian Note Edited: 0010424 View Revisions
2017-11-18 09:59 damian Note Added: 0010426
2017-11-19 15:38 Kunda1 Note Added: 0010430
2017-11-20 05:36 kkremitzki Note Added: 0010434
2018-01-24 20:43 Kunda1 Note Added: 0010845
2018-02-08 09:03 wmayer Assigned To => yorik
2018-02-08 09:03 wmayer Priority normal => low
2018-02-08 09:03 wmayer Severity major => minor
2018-02-08 09:03 wmayer Status confirmed => assigned
2018-02-08 09:03 wmayer Target Version 0.17 => 0.18
2018-12-05 13:07 yorik Note Added: 0012238
2018-12-17 14:37 yorik Note Added: 0012292
2018-12-19 19:40 wmayer Note Added: 0012319
2018-12-19 20:19 wmayer Status assigned => closed
2018-12-19 20:19 wmayer Resolution open => fixed
2018-12-19 20:19 wmayer Fixed in Version => 0.18
2018-12-19 20:19 wmayer Note Added: 0012320
2018-12-19 21:04 yorik Note Added: 0012322