Comment 11 for bug 1848488

Revision history for this message
Fabien Corona (drinausaur) wrote :

That was my first approach.

I would need to access KIGFX::PCB_RENDER_SETTINGS::GetGlobalRatsnestLinesEnabled ()
In
BOARD_NETLIST_UPDATER::addNewComponent()
where I could simply set the local ratsnest setting for each pad to the global setting.

The function I need,GetGlobalRatsnestLinesEnabled (), is defined in:
-PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS

I don't know much of Kicad source code yet, but I don't see any way to get the KIGFX::PCB_RENDER_SETTINGS instance from a BOARD

-----------------

Alternatively, I could use the class that sets the KIGFX::PCB_RENDER_SETTINGS using PCB_RENDER_SETTINGS::LoadDisplayOptions. That function is used by:

-PANEL_PCBNEW_DISPLAY_OPTIONS::TransferDataFromWindow-> A window frame
-FOOTPRINT_VIEWER_FRAME::ApplyDisplaySettingsToGAL -> A window frame

Once again, I am not sure how to link any these class to the board or the netlist updater.

-----------------

PCB_EDIT_FRAME::Exchange_Module does not access the global ratsnest settings, but only copies local settings.
------------------

One solution I can think of, is having a class variable in KIGFX::PCB_RENDER_SETTINGS, shared among all instances, so the netlist updater could instantiate one of them, and then getting the global setting value. But I have no idea what the side effects could be.