← Back to team overview

kicad-developers team mailing list archive

Moving field-texts with connecting line to component; potential patch


While moving a field text (REFERENCE, VALUE and such) in the
schematic, it is possible to loose the visual sight to which component
it belonged to, in particular in tight spaces (which is typically the
time when you need to start moving labels around). At least once I
swapped the visual designators with different components .. creating a

So while moving such a label, I think it would be good if there was a
visual indicator to which component that label belongs to -- a simple
line would do. This would only be drawn while moving is in progress;
see attached image how this could look like.

I have prepared a patch that does that (the image is done with this patch):

As the way to draw differs for not-moving vs. moving (there is an
additional line), the very first draw operation with XOR doesn't make
sense, as the line hasn't been there before. Likewise the opposite
when stopping moving. So here I keep a little state in the SCH_FIELD
component that keeps track if the _last_ draw operation was seeing
IsMoving(). I haven't found if there is a better way within the
framework to better get informed about these transitions. If so,
please point me how to implement that more elegantly.

And as usual, here the patch download link:


Attachment: suggested-move-field-operation.png
Description: PNG image

Follow ups