kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #27111
Re: Current state of ActionPlugin
Le 10/01/2017 à 15:18, Maciej Sumiński a écrit :
> Hi Jean-Samuel,
>
> I think your patch will facilitate use of 3rd party python plugins, as
> the current way of executing commands from the Python shell is not quite
> user friendly. I vote for merging the patch, but we need to fix some
> code formatting issues first.
>
> Also, I wonder if it would be the right thing to group menu entries by
> their categories to create submenus. It could be a simple way to
> organize the actions provided by python plugins. Just an idea.
>
> Another question is about the following lines:
> + if( IsGalCanvasActive() )
> + {
> + UseGalCanvas( GetGalCanvas() );
> + }
>
> What is exactly the goal here? If it is only about refreshing the
> canvas, then a simple Refresh() call should fix the problem.
>
> Regards,
> Orson
>
This is a good work.
Thanks Jean-Samuel.
However, before merging we have to take care of issues which can easily crash Pcbnew:
Because a python script can modify the board outside the control of pcbnew edit functions, I am
thinking problems will arise with undo/redo lists (invalid pointers), ratsnest data and certainly a
few other things.
Especially for scripts which add or delete items, or change connectivity.
Of course, undo/redo lists are alway incorrect after running such scripts.
This is already a known issue for scripts that are run from the Pcbnew python console.
--
Jean-Pierre CHARRAS
References