Le 19/10/2017 à 13:00, jp charras a écrit : > Le 19/10/2017 à 12:55, Maciej Sumiński a écrit : >> On 10/19/2017 11:31 AM, jp charras wrote: >>> Le 18/10/2017 à 16:57, Oliver Walters a écrit : >>>> JP, >>>> >>>> Fantastic, you have worked your magic! That works much better in pcbnew >>>> now, the undo/redo is >>>> working well. >>>> >>>> However, I still see that undo/redo for zone editing is broken in modedit. >>>> >>>> Oliver >>>> >>> >>> Yes, because when an item belonging a footprint is modified, the footprint >>> itself must be stored in >>> undo/redo stack. >>> >>> In other words: >>> commit.Modify( zone ); >>> works only for a zone belonging the board. >>> >>> for a zone belonging a footprint, >>> commit.Modify( footprint); >>> must be used. >>> >>> So, verify the zones added to a footprint has this footprint as parent, >>> and save the parent if a zone has a parent MODULE. >> >> I have not checked it yet, but I suppose it should be possible to modify >> the BOARD_COMMIT class to automagically create a copy of a whole >> footprint when used in the footprint editor. This would allow us to >> write more generic code and remove the confusion.
It looks like it is already the case: BOARD_COMMIT::Push() saves the footprint even if the item is not the footprint when called from the fp editor But BOARD_COMMIT::Push() incorrectly saves items in this case. >> >> Regards, >> Orson > > Yes, this is a better way to fix this issue, and it should simplify the > current code. > > -- Jean-Pierre CHARRAS _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

