Hi James-

After you set a flag on a view item, you will need to update it and then
force a refresh on that item.  This can be done using
`UpdateAllItemsConditionally` and then calling a `ForceRefresh`.  Since the
ERC items live on an overlay, I don't think that you need to mark the layer
dirty.  But if they were on another layer, you would need to mark that
dirty before calling `ForceRefresh()`

Best,
Seth

On Wed, Jan 18, 2023 at 3:52 PM James Jackson <[email protected]>
wrote:

> Hi all,
>
> I'm making some decent progress with
> https://gitlab.com/kicad/code/kicad/-/issues/10926 (WIP here:
> https://gitlab.com/kicad/code/kicad/-/merge_requests/1460 ), but have hit
> an issue I can't figure out.
>
> I need to set EDA_ITEM visibility in SCH_EDIT_FRAME::DisplayCurrentSheet(),
> so I can hide markers on sheets they are not relevant to. I've tried some
> flag twiddling, but this isn't affecting the visibility:
>
> if( setVisible )
> {
>     item->SetFlags( KIGFX::VISIBLE );
> }
> else
> {
>      if( item->HasFlag( KIGFX::VISIBLE ) )
>          item->XorFlags( KIGFX::VISIBLE );
> }
>
> I'd welcome any suggestions on how to change item visibility here.
>
> Many thanks,
> James.
>
> --
> You received this message because you are subscribed to the Google Groups
> "KiCad Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/a/kicad.org/d/msgid/devlist/CANhYM9GSZ8wU2%3DeHmsbaQ%3DME2SsHtWfPjvWoz6dwWF0BeKrMcg%40mail.gmail.com
> <https://groups.google.com/a/kicad.org/d/msgid/devlist/CANhYM9GSZ8wU2%3DeHmsbaQ%3DME2SsHtWfPjvWoz6dwWF0BeKrMcg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>


-- 
[image: KiCad Services Corporation Logo]
Seth Hillbrand
*Lead Developer*
+1-530-302-5483‬
Long Beach, CA
www.kipro-pcb.com    [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"KiCad Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/kicad.org/d/msgid/devlist/CAFdeG-q%3Dsrq9JxQ3ueCpoOUbsDJ-DvHUxjKdzsrXYHgEuBL9dg%40mail.gmail.com.

Reply via email to