# Symbol changed - due to upgrade?

**URL:** <https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645>\
**Category:** Help\
**Created:** [December 13, 2023, 10:02am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645 "2023-12-13T10:02:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![4Springs](https://avatars.discourse-cdn.com/v4/letter/4/ee59a6/32.png) [@4Springs](https://librepcb.discourse.group/u/4Springs)\
**Post date:** [December 13, 2023, 10:02am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/1 "2023-12-13T10:02:17Z")

</div>

I drew a symbol for an optocoupler in my library, here it is in a printout:  
 ![image](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/4ec64c83f3bb0e43c35091485f3e7c00d23382c8.jpeg)

I just noticed that it has changed in the Schematic Editor:  
 ![image](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/d8d942fea9a7899ddf54677a4fbea28d44522dff.png)

And it is different again in the Library:

 ![image](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/f9695fb9ef0515c4c85eb301f825410b79564d5e.png)

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?

---

<div class="post-metadata">

**Author:** ![ubruhin](https://avatars.discourse-cdn.com/v4/letter/u/c89c15/32.png) [@ubruhin](https://librepcb.discourse.group/u/ubruhin)\
**Post date:** [December 13, 2023, 10:36am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/2 "2023-12-13T10:36:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![4Springs](https://avatars.discourse-cdn.com/v4/letter/4/ee59a6/32.png) [@4Springs](https://librepcb.discourse.group/u/4Springs)\
**Post date:** [December 14, 2023, 2:47am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/3 "2023-12-14T02:47:58Z")

</div>

> [@ubruhin](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![ubruhin](https://avatars.discourse-cdn.com/v4/letter/u/c89c15/32.png) [@ubruhin](https://librepcb.discourse.group/u/ubruhin)\
**Post date:** [December 14, 2023, 3:00am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/4 "2023-12-14T03:00:24Z")

</div>

> [@4Springs](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![4Springs](https://avatars.discourse-cdn.com/v4/letter/4/ee59a6/32.png) [@4Springs](https://librepcb.discourse.group/u/4Springs)\
**Post date:** [December 14, 2023, 3:39am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/5 "2023-12-14T03:39:34Z")

</div>

> [@ubruhin](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![ubruhin](https://avatars.discourse-cdn.com/v4/letter/u/c89c15/32.png) [@ubruhin](https://librepcb.discourse.group/u/ubruhin)\
**Post date:** [December 14, 2023, 5:25am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/6 "2023-12-14T05:25:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![4Springs](https://avatars.discourse-cdn.com/v4/letter/4/ee59a6/32.png) [@4Springs](https://librepcb.discourse.group/u/4Springs)\
**Post date:** [December 14, 2023, 6:10am UTC](https://librepcb.discourse.group/t/symbol-changed-due-to-upgrade/645/7 "2023-12-14T06:10:43Z")

</div>

> [@ubruhin](#):
>
> And for the schematic editor, you need to update the project library (Project → Update Project Library) to take effect.

Aha!  
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. 🙂  
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!  
 ![image](https://global.discourse-cdn.com/free1/uploads/librepcb1/original/1X/51363fba862705c7d4a8f33b042da5749a3a5a33.png)
