← Back to team overview

kicad-developers team mailing list archive

Re: Calling PCB_DRAW_PANEL_GAL::SyncLayersVisibility from python?

 

Tested: kicad-r8452.e3c64f1f0-x86_64.exe 
Great job!
LayerViewSet now works without having to manually change the canvas type.
It has gone back to function similar to 4.0.6 stable, requiring the cursorto enter the GLCanvas window to see the layer updates.
In the case of LayerViewSet, pcbnew.UpdateUserInterface() must be called within the script after pcbnew.GetBoard().SetVisibleLayers(). And when Ido so, the interface flickers (particularly the top tool box "F.Cu (PgUp)"layer indicator). Ideally, there'd be a visually cleaner way to do this, but it isvery functional at the moment.
When the cursor enters the GLCanvas window, the layers are redrawn. I suspectthe issue requires a call to SwapBuffers, but it is a common issue with 4.0.6 stable.
 

    On Sunday, August 27, 2017 1:32 AM, jp charras <jp.charras@xxxxxxxxxx> wrote:
 

 Le 23/08/2017 à 16:27, Greg Smith a écrit :
> Better formatting:
> 
> How do you get PCB_EDIT_FRAME functions exposed to python?
> 
> I've been looking around the source code to
> see how to expose them. Specifically, 
> PCB_EDIT_FRAME::syncLayerVisibilities, and other PCB_EDIT_FRAME functions.
> 

In rev a557838c615c9b268830138348c6a8d6a4cc9ba9 I fixed the issue about incorrect user interface
update after running a Action Plugin.

When running a Action Plugin, there is no need to update something, the Action Plugin manager takes
care of that (manages the undo stack, and updates the GUI and the canvas).



-- 
Jean-Pierre CHARRAS


   

Follow ups

References