mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-04-22 12:55:44 +00:00
* EOControl/EOEditingContext.m (_undoManagerCheckpoint:): call
_processEndOfEventNotification by performing a selector through the runloop. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@27898 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c6c28c31d1
commit
d9a429f315
2 changed files with 45 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2009-02-17 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* EOControl/EOEditingContext.m (_undoManagerCheckpoint:): call
|
||||
_processEndOfEventNotification by performing a selector through the
|
||||
runloop.
|
||||
|
||||
2009-02-02 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* GDL2Palette/GNUmakefile: link to libGorm.
|
||||
|
|
|
@ -1269,7 +1269,7 @@ _mergeValueForKey(id obj, id value,
|
|||
{
|
||||
/*
|
||||
* Make sure there is something registered to force processing.
|
||||
* The seems to correspond to the reference implementation but
|
||||
* This seems to correspond to the reference implementation but
|
||||
* also seems very hacky.
|
||||
*/
|
||||
[_undoManager registerUndoWithTarget: self
|
||||
|
@ -1278,17 +1278,23 @@ _mergeValueForKey(id obj, id value,
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO We have some shared code with _undoManagerCheckpoint: here.
|
||||
// which is called (eventually) from the above if statement,
|
||||
// but it is not entirely obvious whether _undoManagerCheckpoint:
|
||||
// can be called independently of _enqueueEndOfEventNotification
|
||||
// so it is possible that this could use a little clean up.
|
||||
NSArray *modes;
|
||||
|
||||
modes = [[EODelayedObserverQueue defaultObserverQueue] runLoopModes];
|
||||
modes = [[EODelayedObserverQueue defaultObserverQueue] runLoopModes];
|
||||
|
||||
[[NSRunLoop currentRunLoop]
|
||||
performSelector: @selector(_processEndOfEventNotification:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: EOEditingContextFlushChangesRunLoopOrdering
|
||||
modes: modes];
|
||||
_flags.registeredForCallback = YES;
|
||||
}
|
||||
_flags.registeredForCallback = YES;
|
||||
}
|
||||
EOFLOGObjectFnStop();
|
||||
}
|
||||
|
@ -1515,7 +1521,37 @@ _mergeValueForKey(id obj, id value,
|
|||
//"Receive NSUndoManagerCheckpointNotification Notification
|
||||
- (void) _undoManagerCheckpoint: (NSNotification*)notification
|
||||
{
|
||||
|
||||
#if 0
|
||||
[self _processEndOfEventNotification: notification];
|
||||
#else
|
||||
/* shared code from _enqueueEndOfEventNotification
|
||||
added as a workaround for bug #25607, it isn't entirely clear
|
||||
if this code acting 'defensively' against calling
|
||||
_processEndOfEventNotiication: before any changes have been made
|
||||
is correct, nor that calling _processEndOfEventNotification only once
|
||||
per runloop iteration is incorrect.
|
||||
because of this I have left the original implemenation #if'd out above.
|
||||
|
||||
see _enqueEndOfEventNotification also for comments on potential
|
||||
clean ups. */
|
||||
if (_flags.registeredForCallback == NO)
|
||||
{
|
||||
NSArray *modes;
|
||||
|
||||
modes = [[EODelayedObserverQueue defaultObserverQueue] runLoopModes];
|
||||
|
||||
[[NSRunLoop currentRunLoop]
|
||||
performSelector: @selector(_processEndOfEventNotification:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: EOEditingContextFlushChangesRunLoopOrdering
|
||||
modes: modes];
|
||||
|
||||
_flags.registeredForCallback = YES;
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
- (BOOL) _processRecentChanges
|
||||
|
|
Loading…
Reference in a new issue