View Issue Details

IDProjectCategoryView StatusLast Update
0000044QElectroTechwebsitepublic2021-02-15 00:51
Reporterxavier Assigned Toxavier  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
Summary0000044: Non-integer coordinates generated when copying and pasting a set of primitives having only integer primitives
Description21:51 < caligula> Hello Gentlemen
21:52 < caligula> I have a question on the Editeur d'elements
21:52 < caligula> I need to cut and past several elements (quite a bit of repetitive art work to build) and the paste function rarely pastes it on the right spot
21:52 < caligula> i.e. instead of pasting on integer values
21:53 < caligula> (like 90, 100, etc.) it pastes at values like 10.2, 10.95, etc.
21:53 < caligula> which means I have to edit post-pasting EACH element to fix it
21:53 < caligula> which kinda negates the productivity I was getting by pasting in the first place
21:53 < caligula> bug? "feature"?
21:54 < caligula> using 0.30a on W7 (within Parallels on a Mac)
21:54 < caligula> (side note: I am about to go nuts with this behavior)
21:57 < xavier> hello
21:59 < xavier> caligula: which kind of paste do you use? There are several ways to paste stuff
21:59 < caligula> Hello Xavier. So, in the editor, I am using CTRL+C followed by CTRL+V
21:59 < caligula> I tried the CTRL+SHIFT+V, same result
21:59 < caligula> i.e. I can't adjust the box to a fixed integer position either with CTRL+SHIFT+V
22:01 < caligula> hint: I started this component by pasting an auto-generated file from the convert_dxf_elmt.py script (to convert a DXF from the KNX ABB library)
22:01 < caligula> so maybe the underlying component definition is unclean
22:01 < xavier> oh that might be the root cause of your problems
22:01 < caligula> should I first try from a blank sheet before whining here?
22:01 < caligula> k
22:01 < xavier> provided the primitives you copy have a "round" width
22:02 < xavier> they should be copied and pasted to round coordinates
22:02 < xavier> mainly because the default Ctrl+V behaviour is "paste it right next to the copy"
22:02 < caligula> I'll try that. Strange thing is that I created brand new elements within that possibly-corrupted sheet, just lines, and when I copy them, they land on non-integer values
22:02 < xavier> and the "right next" simply means += total_width to x cooridnates
22:02 < xavier> coordinates*
22:03 < caligula> k
22:03 < caligula> let me try something clean then...
22:04 < xavier> But I am glad to see someone confirming that getting floating coordinates when working with primitives is a non-expected behaviour
22:05 < xavier> I am currently working on a "decorator" feature (you know, with clickable little squares to resize primitives, etc.)
22:05 < xavier> and this is among the remaining issues
22:05 < caligula> OK, I see, ok
22:05 < caligula> yes, I could imagine non-integer values once you zoom
22:06 < caligula> or by using a CTRL feature when moving with cursors (a la Visio)
22:06 < caligula> but not as a std behavior in a 1:1 mode
22:07 < xavier> actually, all primitives are snapped to the grid
22:07 < xavier> unless you press Ctrl while moving them
22:09 < caligula> OK, I think I found the "bug"
22:09 < caligula> on a clean sheet, same behavior
22:09 < caligula> once you CTRL+V, it seems to work IF you move it with the mouse
22:10 < caligula> but if you start moving with the keyboard, using the keys on the keyboard (arrows), it starts putting it on non-integer values
22:10 < caligula> let me try on the supposedly corrupted one...
22:11 < caligula> yep, seems to work on that one as well!
22:11 < caligula> => use the mouse, not the keyboard
22:11 < xavier> I'm afraid I either do not understand or do not reproduce that bug
22:11 < caligula> ok, here is what I did in details:
22:11 < xavier> could you send me your guilty elements alongs with the shortest procedure required to reproduce the bug
22:12 < caligula> 1) created a X with two lines
22:12 < caligula> 2) copy with CTRL+C
22:12 < caligula> 3) paste with CTRL+V
22:13 < caligula> 4) without first touching the mouse (!), use the keyboard arrow-keys to try moving it to a different place (like a multiple of 10)
22:13 < caligula> => on the X-axis at least (not sure about the Y-axis), it starts putting it on non-Integer values
22:13 < xavier> I am afraid it is much simpler than that
22:14 < xavier> I guess you can't reproduce it with a bunch of rectangles?
22:14 < caligula> let me try
22:14 < xavier> well perhaps it could still happen with rectangles
22:15 < xavier> My guess is: it is related to the total width of the selected primitives
22:15 < caligula> rectancles seems fine, indeed
22:16 < xavier> I may be able to solve that by reviewing how the target coordinates are determined
22:17 < caligula> first line is: {X1: 9; X2: 14; Y1: 8; Y2: 13; Fin 1: Normale - 1.5; Fin 2: Normale - 1.5}
22:17 < caligula> Second line is identical, just swap X1 and X2
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2013-01-02 22:28 xavier New Issue
2013-01-02 22:28 xavier Status new => assigned
2013-01-02 22:28 xavier Assigned To => xavier
2013-06-09 14:06 scorpio810_mantis Category Éditeur d'éléments => Symbol editor
2013-06-09 14:11 scorpio810_mantis Category Symbol editor => Element Editor
2017-02-11 13:01 black_sun Status assigned => closed
2021-02-15 00:51 user245 Category Element Editor => website