mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Apply nsundomanager patch from wolfgang lux
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/stable@25524 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
879147b7c2
commit
29cc64eb05
2 changed files with 33 additions and 21 deletions
|
@ -162,13 +162,9 @@
|
|||
@implementation NSUndoManager (Private)
|
||||
- (void) _loop: (id)arg
|
||||
{
|
||||
if (_groupsByEvent)
|
||||
if (_groupsByEvent && _group != nil)
|
||||
{
|
||||
if (_group != nil)
|
||||
{
|
||||
[self endUndoGrouping];
|
||||
}
|
||||
[self beginUndoGrouping];
|
||||
[self endUndoGrouping];
|
||||
}
|
||||
_runLoopGroupingPending = NO;
|
||||
}
|
||||
|
@ -218,9 +214,10 @@
|
|||
{
|
||||
RELEASE(parent);
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerDidOpenUndoGroupNotification
|
||||
object: self];
|
||||
if (_isUndoing == NO && _isRedoing == NO)
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerDidOpenUndoGroupNotification
|
||||
object: self];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -334,9 +331,10 @@
|
|||
p = RETAIN([g parent]);
|
||||
_group = p;
|
||||
[g orphan];
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerWillCloseUndoGroupNotification
|
||||
object: self];
|
||||
if (_isUndoing == NO && _isRedoing == NO)
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
postNotificationName: NSUndoManagerWillCloseUndoGroupNotification
|
||||
object: self];
|
||||
if (p == nil)
|
||||
{
|
||||
if (_isUndoing)
|
||||
|
@ -882,15 +880,18 @@
|
|||
if (_modes != newModes)
|
||||
{
|
||||
ASSIGN(_modes, newModes);
|
||||
[[NSRunLoop currentRunLoop] cancelPerformSelector: @selector(_loop:)
|
||||
target: self
|
||||
argument: nil];
|
||||
[[NSRunLoop currentRunLoop] performSelector: @selector(_loop:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: NSUndoCloseGroupingRunLoopOrdering
|
||||
modes: _modes];
|
||||
_runLoopGroupingPending = YES;
|
||||
if (_runLoopGroupingPending)
|
||||
{
|
||||
NSRunLoop *runLoop = [NSRunLoop currentRunLoop];
|
||||
[runLoop cancelPerformSelector: @selector(_loop:)
|
||||
target: self
|
||||
argument: nil];
|
||||
[runLoop performSelector: @selector(_loop:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: NSUndoCloseGroupingRunLoopOrdering
|
||||
modes: _modes];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue