← Back to team overview

kicad-developers team mailing list archive

help with redraw

 

Hi,

could you maybe help me finding the right redraw or refresh or whatever
function? I can draw everything, but I see my polygons only after I
switched the canvas once (Cairo->OpenGL or vice versa). So my workflow
at the moment is: 1. Open pcbnew, 2. switch the canvas, 3. then work
normally.

I followed the structure of RATSNEST and added a layer "LAYER_SI_MESH"
(like "LAYER_RATSNEST").

https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/include/layers_id_colors_and_visibility.h#L205


I then added a "SI_MESH_VIEWITEM" (like "RATSNEST_VIEWITEM") which has a
"ViewDraw" function, wherein I draw the polygons on the GAL.

https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/pcbnew/si_mesh_viewitem.cpp#L54


In PCB_DRAW_PANEL_GAL::DisplayBoard( BOARD* aBoard ), I added the
SI_MESH_VIEWITEM

https://github.com/andreasbuhr/kicad/blob/e9695ce2f735d660771e342c4538ad707e97aa16/pcbnew/pcb_draw_panel_gal.cpp#L178

But it seems I am missing something. Any suggestions?

Thanks a lot!
Andreas


Follow ups