Symbol changed - due to upgrade?

I drew a symbol for an optocoupler in my library, here it is in a printout:

I just noticed that it has changed in the Schematic Editor:

And it is different again in the Library:

I assume this would have happened when I upgraded to version 1.0.0, although I’ve only just noticed it now.
Will I have to re-draw this?

Yeah unfortunately this is a side-effect of a graphics refactoring in LibrePCB 1.0.0 which changed the drawing order of objects. I hope we can fix this in the next release. In the mean time, you could either delete and redraw the lines (or the rectangle), or alternatively manually change the order of the polygons in the symbol.lp file.

I found the symbol.lp file, and can see the entries for the polygons. What do you mean by change the order?

Just reorder them. The polygon with (grab_area true) should be the first one (or the last one, I’m not sure) in the file.

There are about 15 polygons. The first and last polygons both had grab_area true. I tried cutting and pasting some polygons to different places in the file, without making any difference. I also tried putting the polygons first (before the pins), and that also didn’t do anything.
Each time I’d save the file, then re-scan the libraries.

Hm okay :-/ I’m not sure anymore, maybe the UUID has also an effect on the drawing order. In this case you need to swap the UUID of the polygons to make sure the polygon(s) with grab_area true have either the highest or the lowest UUID.

Anyway, we really need to fix this for the next release as it is very cumbersome. I’m sorry for the inconvenience.

Ah an btw, when saving the symbol.lp file, no library rescan is needed. In the symbol editor, just close & reopen the symbol and it will be updated immediately. And for the schematic editor, you need to update the project library (Project → Update Project Library) to take effect.

I just came here to ask about this.
I’ve re-drawn the symbol, with the help of looking at the polygon numbers in the symbol.lp file. :slight_smile:
But my changes weren’t showing up on the Schematic Editor. I’d seen that menu option, but thought it was the same as the Library re-scan.
All good now!

1 Like