Re: [Kicad-developers] Undo paradigms

2019-05-27 Thread Wayne Stambaugh
On 5/27/19 11:11 AM, Seth Hillbrand wrote:
> On 2019-05-27 11:05, Tomasz Wlostowski wrote:
>> On 27/05/2019 16:46, Jeff Young wrote:
>>> Hi Seth,
>>>
>>> The Eeschema has one advantage that if you mess it up you get too
>>> many undo steps rather than too few.  But it is somewhat crankier
>>> code to get right.
>>>
>>> I agree that we should have only one scheme.  I don’t believe
>>> anyone’s working on it — although it would probably be Tom if anyone
>>> was.
>>
>> Hi,
>>
>> Some time ago we introduced with Orson the COMMIT object, which manages
>> atomic updates to the PCB, lightweight notifications as well as creation
>> of undo entries. How about porting this to eeschema?
>>
>> Tom
> 
> Yup, that's exactly the idea.
> 
> -Seth

It seems to me the obvious place to put this would be the concrete
SCHEMATIC object in a similar manner to the BOARD object so I'll take a
look at it when I'm working on that.  It will be substantially more
difficult do to the hierarchical sheet issues.  I haven't thought about
it that much yet but it's definitely on my radar.  We've needed a decent
undo/redo solution for hierarchical sheets since I joined the project.

Cheers,

Wayne


___
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


Re: [Kicad-developers] Undo paradigms

2019-05-27 Thread Seth Hillbrand

On 2019-05-27 11:05, Tomasz Wlostowski wrote:

On 27/05/2019 16:46, Jeff Young wrote:

Hi Seth,

The Eeschema has one advantage that if you mess it up you get too many 
undo steps rather than too few.  But it is somewhat crankier code to 
get right.


I agree that we should have only one scheme.  I don’t believe anyone’s 
working on it — although it would probably be Tom if anyone was.


Hi,

Some time ago we introduced with Orson the COMMIT object, which manages
atomic updates to the PCB, lightweight notifications as well as 
creation

of undo entries. How about porting this to eeschema?

Tom


Yup, that's exactly the idea.

-Seth

___
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


Re: [Kicad-developers] Undo paradigms

2019-05-27 Thread Tomasz Wlostowski
On 27/05/2019 16:46, Jeff Young wrote:
> Hi Seth,
> 
> The Eeschema has one advantage that if you mess it up you get too many undo 
> steps rather than too few.  But it is somewhat crankier code to get right.
> 
> I agree that we should have only one scheme.  I don’t believe anyone’s 
> working on it — although it would probably be Tom if anyone was.

Hi,

Some time ago we introduced with Orson the COMMIT object, which manages
atomic updates to the PCB, lightweight notifications as well as creation
of undo entries. How about porting this to eeschema?

Tom

___
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


Re: [Kicad-developers] Undo paradigms

2019-05-27 Thread Jeff Young
Hi Seth,

The Eeschema has one advantage that if you mess it up you get too many undo 
steps rather than too few.  But it is somewhat crankier code to get right.

I agree that we should have only one scheme.  I don’t believe anyone’s working 
on it — although it would probably be Tom if anyone was.

Cheers,
Jeff.


> On 27 May 2019, at 15:30, Seth Hillbrand  wrote:
> 
> Hi Devs-
> 
> We have two different paradigms for undo/redo stacks.  The eeschema paradigm 
> and the pcbnew paradigm.  In Eeschema, we add things directly to the undo 
> stack, optionally appending to the last item.  In Pcbnew, we queue an undo 
> step in the frame until all items are added and then push the step to the 
> stack.
> 
> Personally, I have found the pcbnew model to be much more robust and it 
> avoids passing around the "are we appending now?" flag to each intermediate 
> step.  It also avoids having to change the undo stack when a command is 
> canceled.
> 
> I'd like to move eeschema over to the pcbnew model.  Is anyone working on 
> this already?
> 
> -Seth
> 
> ___
> 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


___
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


[Kicad-developers] Undo paradigms

2019-05-27 Thread Seth Hillbrand

Hi Devs-

We have two different paradigms for undo/redo stacks.  The eeschema 
paradigm and the pcbnew paradigm.  In Eeschema, we add things directly 
to the undo stack, optionally appending to the last item.  In Pcbnew, we 
queue an undo step in the frame until all items are added and then push 
the step to the stack.


Personally, I have found the pcbnew model to be much more robust and it 
avoids passing around the "are we appending now?" flag to each 
intermediate step.  It also avoids having to change the undo stack when 
a command is canceled.


I'd like to move eeschema over to the pcbnew model.  Is anyone working 
on this already?


-Seth

___
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