← Back to team overview

kicad-developers team mailing list archive

Re: Static variables in module editor

 

<....>

>>> I committed class PROJECT::GetRString() and SetRString() in rev. 4934, paving the way for
>>> saving the MODULE in a session and project specific location and retaining the current UI
>>> behaviour, while clearing some of the clutter in the path of multiple open projects.
>>
>> Hi Dick,
>>
>> I agree with Lorenzo and Tom - I prefer the module editor to start 
>> either empty or with a footprint loaded from library or board, 
> 
> 
> We are debating "the current UI behaviour" vs. "some new undefined UI behaviour".
> 
> Here is the current behaviour, which I'm arguing should be preserved:
> 
> CURRENT BEHAVIOUR:
> ==================
> On the *second or subsequent* time you enter the module editor within a given process
> session, show the MODULE you were working on from the previous life of FOOTPRINT_EDIT_FRAME.
> 
> If its the first time that FOOTPRINT_EDIT_FRAME is shown within a given process session,
> then show an empty screen (no module).
> 
> Note that it is not uncommon to close the FOOTPRINT_EDIT_FRAME if you only have a single
> monitor.  When you re-enter the module editor, Jean-Pierre and I thought that it made
> sense to go back to the MODULE that you had been working on.
> 
> Note that the MODULE "you had been working on" *must* have come from either the BOARD, or
> one of the libraries associated with what: the current project.  I think this dovetails
> precisely into the last part of your last sentence above.
> 
> The Kiway() window DNA gives each instantiation of the FOOTPRINT_EDIT_FRAME its own
> PROJECT.  This is not going to change anytime soon.

I agree with Dick:
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 fully understand the fact static variables should be removed.

Obviously, I did do yet used PROJECT::GetRString(), but I am thinking
this is a powerful feature to save some info during a session (in this
case the S expression description of the footprint).

So I am thinking it is worth to save/retrieve the currently edited
footprint to an "RString", for at least 2 reasons:

- the current behavior is not so bad.
- The work to save/retrieve will also be very useful, because I am
thinking it is 99% of the code needed to copy/paste footprints and
boards (or selected items in a board) to/from the clipboard.

So, I am thinking it is worth to keep the current behavior, now the
PROJECT::SetRString() and PROJECT::GetRString() exists, especially if we
are thinking also to the copy/paste feature (between instances of Pcbnew
or ModEdit).

-- 
Jean-Pierre CHARRAS


Follow ups

References