Hello!

Here is a patch for NSUndoManager. The patch prevents NSUndoManager from
(incorrectly!) posting NSUndoManagerDidOpenUndoGroupNotification and
NSUndoManagerWillCloseUndoGroupNotification notifications when performing
an undo or redo. Furthermore, with this patch the private -_loop: method
no longer opens a new undo group automatically. This is
a) unnecessary because the methods -forwardInvocation: and
-registerUndoWithTarget:selector:object: already take care of this, and
b) can needlessly create empty undo groups on the undo stack.
Creating such empty groups will confuse the change count management in
NSDocument. For the same reason, the patch changes the code in
-setRunLoopModes: such that it will not schedule a call to -_loop:
unconditionally.

As a consequence of these changes, the change count of an NSDocument now
becomes zero again after undoing all changes in the document.

Wolfgang

Attachment: NSUndoManager.patch
Description: Binary data

_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to