mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Make behavior closer to MacOS-X ... no checkpoint notification for an implicit
begin grouping at the top level. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27980 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8ebcef5198
commit
68d0bb48f1
1 changed files with 13 additions and 9 deletions
|
@ -187,12 +187,6 @@
|
|||
postNotificationName: NSUndoManagerDidOpenUndoGroupNotification
|
||||
object: self];
|
||||
}
|
||||
if (_isUndoing == NO)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerCheckpointNotification
|
||||
object: self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) _loop: (id)arg
|
||||
|
@ -225,7 +219,7 @@
|
|||
* atomically undone by an [-undo] invocation.<br />
|
||||
* This method posts an NSUndoManagerDidOpenUndoGroupNotification
|
||||
* upon creating the grouping.<br />
|
||||
* It then posts an NSUndoManagerCheckpointNotification
|
||||
* It first posts an NSUndoManagerCheckpointNotification
|
||||
* unless an undo is currently in progress.<br />
|
||||
* The order of these notifications is undefined, but the GNUstep
|
||||
* implementation currently mimics the observed order in MacOS-X 10.5
|
||||
|
@ -233,13 +227,23 @@
|
|||
- (void) beginUndoGrouping
|
||||
{
|
||||
/* It seems that MacOS-X 10.5 implicitly creates a top-level group
|
||||
* if this method is called when groupsbyEvent is set and there is
|
||||
* no existing top level group.
|
||||
* if this method is called when groupsByEvent is set and there is
|
||||
* no existing top level group. There is no checkpoint notification
|
||||
* posted for the implicit group creation.
|
||||
*/
|
||||
if (_group == nil && [self groupsByEvent])
|
||||
{
|
||||
[self _begin]; // Start top level group
|
||||
}
|
||||
|
||||
/* Post the checkpoint notification and THEN create the group.
|
||||
*/
|
||||
if (_isUndoing == NO)
|
||||
{
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerCheckpointNotification
|
||||
object: self];
|
||||
}
|
||||
[self _begin]; // Start a new group
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue