On 06/10/2014 04:14 PM, Lorenzo Marcantonio wrote: > On Tue, Jun 10, 2014 at 08:58:04PM +0200, jp charras wrote: >> when reopening an editor, reopen the latest document(s) previously >> opened makes sense, and moreover is a common feature in many editors. >> My text editor does that, and this feature save a lot of time for me. >> And Kicad too, which reopens the latest project. >> By the way, Altium also does that. > > I think that to 'solve' this we should decide if there could be more > than one open editor.
I don't know what you don't know. I know Orson seems to have a good understanding of the architecture and the need. And since he and I are coding this, that is probably good enough. In his absence, I code it. I don't know what you don't know. Lorenzo, please read the modular kicad blueprint. It clearly states that the python project manager opens more than one project, whereas single top and the C++ project manager have one KIWAY. Each KIWAY has its own PROJECT. All the windows in a project are tied to the same PROJECT in a KIWAY. The C++ project manager and the single_top KIWAY, are both single instance. The python project manager will have multiple KIWAYs, from KIWAY_MGR class. All the windows associated with a single PROJECT are given access to it, the PROJECT, through window DNA. The actual DNA is the contents of KIWAY_HOLDER. The purpose of milestone B) is to get PROJECT renaming, opening, and creating, solid. These are not solid yet, we are only 50% through milestone B). The KIWAY window DNA is the KIWAY_HOLDER object, present now in all the wxWindows we use (except those in the C++ project manager which are ABOVE the KIWAY.) The source to the KIWAY_HOLDER::Prj() is here. PROJECT& KIWAY_HOLDER::Prj() const { return Kiway().Prj(); } Yes, there can be more than one open FOOTPRINT_EDITOR_FRAME under the python project manager only. But each will have its own PROJECT, and therefore its own last module. > What if I open a new one, then close both, and > then open another? Go to bed, this is minus one open. > There are two 'last' objects in this case... Each editor has its own window DNA, and therefore its own last MODULE because Prj() returns something different for each. One might have access to different libraries, particularly the Project Specific libraries are unique for each project. The global ones are shared and common, and therefore accessible from both editors. > If the 'reopen last' feature is desired then the project object could be > a good place to store it. When used standalone (for library edit only) > some kind of noname/dummy project could be provided for it. Or maybe > only keep the last for edits done in the context of a project (no > project->no place to store the last one). _______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : kicad-developers@lists.launchpad.net Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp