Hi Seth, This was actually happening before a global Update... and ForceRefresh(), so slightly confused why it wasn't working. However, on the MR thread Jeff Young suggested another method which has worked perfectly. I'll tidy up the commit and get some more involved testing done, but it's looking good so far.
Yours, James. On Thursday, January 19, 2023 at 12:47:42 AM UTC se...@kipro-pcb.com wrote: > 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 <james.a.f...@gmail.com> > 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 devlist+u...@kicad.org. >> 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 <(530)%20302-5483> > Long Beach, CA > www.kipro-pcb.com in...@kipro-pcb.com > -- 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 devlist+unsubscr...@kicad.org. To view this discussion on the web visit https://groups.google.com/a/kicad.org/d/msgid/devlist/a0ff9c79-852f-4045-acbd-3c801f6b3140n%40kicad.org.