← Back to team overview

kicad-developers team mailing list archive

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

 

Hi Marco,

On 9 February 2014 03:26, Marco Serantoni <marco.serantoni@xxxxxxxxx> wrote:
>
>>  -  In other places in the code that has to do with redraws, there is
>> some special handling with the USE_WX_OVERLAY macro. I can't really
>> test this properly in my installation of wxWidgets, so I don't know if
>> I always do what would be needed in this case.
>>
>
> Henner,
> This is my code, for OSX, Mac having a vectorial GUI interface, doesn’t have graphical logical operations.
> so i managed to use Native Overlay to “cleanup”, i don’t know this way is viable for other platforms,
> but is the ONLY way we could manage “immediate” changes with the current drawing code.
>
> When a tool is selected, the object is flagged in “MOVE” so not drawn in the first refresh that will be keeped.
> All moves and “immediate” operations are drawn on the overlay that is erased each time.
> When operation ends, there will be a refresh that will shown the ending result.
>
> If you patch, just remember to honor the ERASE flag when erasing with XOR, the rest should be managed:
> Overlay code will do the rest.

Thanks for the explanation. Not sure what you mean with ERASE flag; is
it the STRUCT_DELETE flag ?

Right now, when I attempt to erase something, I'll override it with
XOR. Essentially, as last operation before drawing the component in
'normal mode', it erases the last 'wireframe representation'; this is
before any flags are cleared, so if this flag is already set it might
work. Have a look at the patch, it is very simple and you should be
able to spot if that works on OS X.
Can you patch this on OS X and see if it works ? The activity in
question is moving a field such as a reference designator ( like "R2"
) or a value ( "100k" ) in the schematic. It should draw a connecting
line between the label and the center of its component ... and
properly erase the line once the move is done.
(When I tried to use KiCad on Linux with the USE_WX_OVERLAY - define,
I get all sorts of artifacts in general drawing code, so I can't test
it here.)

Thanks,
  -henner

>
> —
> Marco


Follow ups

References