← Back to team overview

kicad-developers team mailing list archive

Re: [FEATURE] Component table viewer


On 4/18/2017 3:12 AM, jp charras wrote:
> Le 17/04/2017 à 22:51, Nox a écrit :
>> I know that I already suggested that in another context but what about changing the undo/redo
>> semantic to the more common approach to maintain an global undo/redo stack and switch the view
>> accordingly? I know that the "per screen" is the established way in kicad and that it is very
>> dangerous to break existing workflows. But the undo/redo behaviour is currently hardly
>> "understandable" for beginners. E.g. why does the undo not follow my actions but stays on one view?
>> Why does exporting the netlist break the undo? Why can automatic annotation not be reverted? The
>> undo list wiped on a frequently basis that personally i hardly trust into the undo functionality at
>> all.
>> Would it be an option to introduce a "test version" of a global undo/redo to get some feedback from
>> the crowed which way would be preferred?
> For me, the problem is not to have a global or per screen undo/redo list, but what an user is
> expecting when undoing/redoing a change.
> We *always* expect to undo the last change.
> Any undo/redo system has this behavior.
> Now consider an editor (the schematic editor with 3 sheets for instance, but this is also the case
> of text editors with 3 files opened and currently edited).
> 1 - in sheet1 you call a tool (component table editor, automatic annotation) which modify all sheets.
> 2 - after  that you enter sheet2 and make new changes then sheet3 and also make new changes.
> 3 - back to sheet1 and try to undelete the latest change in this sheet: this is the global change
> (i.e. annotation). This is possible in sheet1.
> But how can you undo this annotation in others sheets: this is not the latest change and cannot be
> undone safely (you can have deleted/replaced/edited a symbol in other sheets, or deleted a sheet):
> what is the actual meaning of "undo the annotation" in other sheets).
> And ultimately:
> What a undo (and therefore redo) command must undo:
> 1 - the latest change in the full schematic (global undo/redo)
>  or
> 2 - the latest change in the currently edited (active) sheet (local undo/redo)
> This is a choice, and the answer is for me not trivial.

I agree.  This answer is not obvious.  Global undo may seem like the
obvious choice but I'm not sure users will expect undo to undo changes
in a sheet other than the one they are currently working on.  Using per
sheet undo to undo a global change such as an full annotation might be
confusing as well.

The other issue is that any global undo feature has to be very carefully
designed because any component and/or sheet edited by a global command
such as annotate could be deleted in subsequent editing which could
cause the pointers in the undo buffer to be broken.

> It could be worth to know what is the option for global/local changes in a schematic hierarchy in
> other schematic editors.

If someone has the time to test some other schematic editors to see if
they support global change undo, it would be helpful.  I'm guessing
annotation would be the easiest thing to test.

> Multi-file text editors can undo the latest change only in the active file, not in all opened files.

I'm not sure if this is a good analogy.  Text files are completely stand
alone and do not have any pointers to objects in other text files being
edited so there is no possibility of invalid object pointers during undo.