[Kicad-developers] How do I refresh PCB or Schematic window
Hello & thanks for the help. I open a dialog in PCBNew to run my geographical reannotation code and all seems to work, however, I can't figure out how to get the PCBNew or eeSchema displays to refresh to show the result. I can zoom in/zoom out manually and the new values appear but I would the refresh to automatically. I have tried m_frame->GetToolManager()->RunAction(ACTIONS::zoomRedraw, true); m_frame->HardRedraw(); m_frame->RefreshCanvas(); m_frame->GetCanvas()->ForceRefresh(); m_frame->GetCanvas()->Refresh(); And none seem to work. Any advice would be appreciated. Brian ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] How do I refresh PCB or Schematic window
Are you doing something like getView()->Update( item ); for the items that you are touching? That plus GetCanvas()->Refresh() should be enough. Is your code somewhere we can look at? On Wed, Jan 8, 2020 at 11:02 PM Brian Piccioni wrote: > Hello & thanks for the help. > > I open a dialog in PCBNew to run my geographical reannotation code and > all seems to work, however, > I can't figure out how to get the PCBNew or eeSchema displays to refresh > to show the result. I can > zoom in/zoom out manually and the new values appear but I would the > refresh to automatically. > > I have tried > > m_frame->GetToolManager()->RunAction(ACTIONS::zoomRedraw, true); > m_frame->HardRedraw(); > m_frame->RefreshCanvas(); > m_frame->GetCanvas()->ForceRefresh(); > m_frame->GetCanvas()->Refresh(); > > And none seem to work. > > Any advice would be appreciated. > > Brian > > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp > ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp
Re: [Kicad-developers] How do I refresh PCB or Schematic window
Hi Brian, I'm sure that will work with the eeschema: g_CurrentSheet->UpdateAllScreenReferences(); m_frame->SetSheetNumberAndCount(); m_frame->SyncView(); m_frame->OnModify(); m_frame->GetCanvas()->Refresh(); m_frame is SCH_EDIT_FRAME* Probably with pcbnew will be something different. I'm not sure and I can't check now. On Thu, 9 Jan 2020 at 07:02, Brian Piccioni wrote: > > Hello & thanks for the help. > > I open a dialog in PCBNew to run my geographical reannotation code and > all seems to work, however, > I can't figure out how to get the PCBNew or eeSchema displays to refresh > to show the result. I can > zoom in/zoom out manually and the new values appear but I would the > refresh to automatically. > > I have tried > > m_frame->GetToolManager()->RunAction(ACTIONS::zoomRedraw, true); > m_frame->HardRedraw(); > m_frame->RefreshCanvas(); > m_frame->GetCanvas()->ForceRefresh(); > m_frame->GetCanvas()->Refresh(); > > And none seem to work. > > Any advice would be appreciated. > > Brian > > > ___ > Mailing list: https://launchpad.net/~kicad-developers > Post to : kicad-developers@lists.launchpad.net > Unsubscribe : https://launchpad.net/~kicad-developers > More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp