mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 16:50:58 +00:00
Futher improvements to NSUndoManager.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@20593 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c4a389549a
commit
566ede417f
2 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2005-01-21 22:08 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* Source/NSUndoManager.m: [NSUndoManager redo] and
|
||||||
|
[NSUndoManager undoNestedGroup] moved the call to actionName
|
||||||
|
to a later point in both methods to get the name from the
|
||||||
|
"groupToRedo" or the "groupToUndo" respectively. This
|
||||||
|
corrects the issue with the wrong name sometimes appearing
|
||||||
|
in the redo/undo menu items.
|
||||||
|
|
||||||
2005-01-16 07:59 Gregory John Casamento <greg_casamento@yahoo.com>
|
2005-01-16 07:59 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSUndoManager.m: Added code to properly set the
|
* Source/NSUndoManager.m: Added code to properly set the
|
||||||
|
|
|
@ -582,7 +582,7 @@
|
||||||
*/
|
*/
|
||||||
- (void) redo
|
- (void) redo
|
||||||
{
|
{
|
||||||
NSString *name = [NSString stringWithString: [self redoActionName]];
|
NSString *name = nil;
|
||||||
|
|
||||||
if (_isUndoing || _isRedoing)
|
if (_isUndoing || _isRedoing)
|
||||||
{
|
{
|
||||||
|
@ -604,6 +604,8 @@
|
||||||
groupToRedo = RETAIN([_redoStack lastObject]);
|
groupToRedo = RETAIN([_redoStack lastObject]);
|
||||||
[_redoStack removeLastObject];
|
[_redoStack removeLastObject];
|
||||||
|
|
||||||
|
name = [NSString stringWithString: [groupToRedo actionName]];
|
||||||
|
|
||||||
oldGroup = _group;
|
oldGroup = _group;
|
||||||
_group = nil;
|
_group = nil;
|
||||||
_isRedoing = YES;
|
_isRedoing = YES;
|
||||||
|
@ -965,7 +967,7 @@
|
||||||
*/
|
*/
|
||||||
- (void) undoNestedGroup
|
- (void) undoNestedGroup
|
||||||
{
|
{
|
||||||
NSString *name = [NSString stringWithString: [self undoActionName]];
|
NSString *name = nil;
|
||||||
PrivateUndoGroup *oldGroup;
|
PrivateUndoGroup *oldGroup;
|
||||||
PrivateUndoGroup *groupToUndo;
|
PrivateUndoGroup *groupToUndo;
|
||||||
|
|
||||||
|
@ -1011,6 +1013,8 @@
|
||||||
[_undoStack removeLastObject];
|
[_undoStack removeLastObject];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
name = [NSString stringWithString: [groupToUndo actionName]];
|
||||||
|
|
||||||
[self beginUndoGrouping];
|
[self beginUndoGrouping];
|
||||||
[groupToUndo perform];
|
[groupToUndo perform];
|
||||||
RELEASE(groupToUndo);
|
RELEASE(groupToUndo);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue