← Back to team overview

kicad-developers team mailing list archive

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


Le 07/02/2014 09:22, Henner Zeller a écrit :
> Hi,
> 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
> mess.
> 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):
> https://github.com/hzeller/kicad/compare/master...show-belongs-to-edge-while-moving-labels
> 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:
> https://github.com/hzeller/kicad/compare/master...show-belongs-to-edge-while-moving-labels.diff
> cheers,
>  -henner

Good idea.
This feature was existing in Pcbnew, but not in Eeschema.
May I ask you to have a look to our coding style policy
(see Documentation/coding_style_policy.pdf) before submitting a patch.

Thanks for your interest in Kicad.

Jean-Pierre CHARRAS

Follow ups