[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question about NSUndoManager
From: |
Germán Arias |
Subject: |
Re: Question about NSUndoManager |
Date: |
Mon, 04 Nov 2013 19:32:17 -0600 |
User-agent: |
GNUMail (Version 1.2.0) |
On 2013-11-04 10:32:29 -0600 Riccardo Mottola <address@hidden> wrote:
> Hi,
>
> Germn Arias wrote:
>> Well, I added a small fix in Base for don't return null objects for item
>> title.
> Hmm, perhaps that is not the real cause. By testing a bit undo, I
> noticed that sometimes the action has the wrong name. E.g.
>
> 1) move an object
> 2) edit it
>
> now undo may sometimes show "undo move", but actually, undoing, removes
> the editing, but preserves the move. I suppose that at the beginning,
> there is no previous action, so you got "".
Yes, this is the problem. The last undo action is not at _undoStack. So,
NSUndoManager returns the title of previous action (if any). If not, returns
null.
But maybe in your machine, null is interpreted as empty string.
Germán.
>>
>> On the other hand, the undo doesn't works properly on Graphos. If you
>> add a circle and then resize it, the menu offers the option to "Undo edit
>> path", but don't works.
>>
> Right! Path editing did save the stack shallow and not deep, which is
> wrong, I fixed that. Thanks, already commited.
>
> Riccardo
>
>