mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Fixed to remove grouping in progress.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22578 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
aad5fbe073
commit
9b09f56c62
2 changed files with 16 additions and 6 deletions
|
@ -7,6 +7,8 @@
|
|||
global setter mechanism (strangely recommended in the libxml2 docs),
|
||||
so that all setup is made to the individual parser and should not
|
||||
effect other parsers in other threads.
|
||||
* Source/NSUndoManager.m: ([-removeAllActions]) fixed to remove any
|
||||
grouping in progress.
|
||||
|
||||
2006-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -340,7 +340,9 @@
|
|||
{
|
||||
if (_isUndoing)
|
||||
{
|
||||
if (_levelsOfUndo > 0 && [_redoStack count] == _levelsOfUndo && [[g actions] count] > 0)
|
||||
if (_levelsOfUndo > 0
|
||||
&& [_redoStack count] == _levelsOfUndo
|
||||
&& [[g actions] count] > 0)
|
||||
{
|
||||
[_redoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
@ -353,7 +355,9 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
if (_levelsOfUndo > 0 && [_undoStack count] == _levelsOfUndo && [[g actions] count] > 0)
|
||||
if (_levelsOfUndo > 0
|
||||
&& [_undoStack count] == _levelsOfUndo
|
||||
&& [[g actions] count] > 0)
|
||||
{
|
||||
[_undoStack removeObjectAtIndex: 0];
|
||||
}
|
||||
|
@ -758,6 +762,10 @@
|
|||
*/
|
||||
- (void) removeAllActions
|
||||
{
|
||||
while (_group != nil)
|
||||
{
|
||||
[self endUndoGrouping];
|
||||
}
|
||||
[_redoStack removeAllObjects];
|
||||
[_undoStack removeAllObjects];
|
||||
_isRedoing = NO;
|
||||
|
@ -877,10 +885,10 @@
|
|||
target: self
|
||||
argument: nil];
|
||||
[[NSRunLoop currentRunLoop] performSelector: @selector(_loop:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: NSUndoCloseGroupingRunLoopOrdering
|
||||
modes: _modes];
|
||||
target: self
|
||||
argument: nil
|
||||
order: NSUndoCloseGroupingRunLoopOrdering
|
||||
modes: _modes];
|
||||
_runLoopGroupingPending = YES;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue