← Back to team overview

kicad-developers team mailing list archive

Re: [Patch] pcbnew clipboard support

 

Thank you! I will take a look at that PCB when I get home from work.

The refill zones is probably only one of the few quirks that comes with the fact that I am piggybacking on the appendBoard function.

This is the broad flow:

I wrapped/inherited the real parser and redirected the output/input into the the clipboard. This way I will not have to rewrite the parsing code when the file format changes, it will follow the regular file parsing.

The copy tool checks if the selected items are only module parts or mixed. If they are mixed it fakes a new pcb in the clipboard, otherwise it creates a new module in the clipboard.

I then use same parser when pasting, swithcing on the result of the parsed objects type

type = module, invoke the add part tool
type = pcb, invoke the appendBoard.

So to make a very long answer short, the appendBoard probably redraws the zones, and I have not checked why.

On 09/18/2017 01:35 PM, Tomasz Wlostowski wrote:
On 18.09.2017 12:57, Kristoffer Ödmark wrote:
Hmm, I cannot manage to reproduce the crash.

The things you are testing on, is the components pasted in using an
earlier version?

Hi Kristoffer,

Open the attached board, select P19 (connector on the right side) and
press Ctrl-C. A segfault will occur (at least on my machine) - release
x86_64 build.

PS. Why all the zones are refilled after pasting something? Is this
intentional?

Tom


--
 -Kristoffer


References