mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Post the NSControlTextDidEndEditingNotification *after* actually ending
editing :-) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13979 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
763c6093fa
commit
d024336615
3 changed files with 14 additions and 15 deletions
|
@ -1520,6 +1520,9 @@ static SEL getSel;
|
|||
|
||||
[self validateEditing];
|
||||
|
||||
[_selectedCell endEditing: [aNotification object]];
|
||||
_textObject = nil;
|
||||
|
||||
d = [[NSMutableDictionary alloc] initWithDictionary:
|
||||
[aNotification userInfo]];
|
||||
AUTORELEASE (d);
|
||||
|
@ -1528,9 +1531,6 @@ static SEL getSel;
|
|||
object: self
|
||||
userInfo: d];
|
||||
|
||||
[_selectedCell endEditing: [aNotification object]];
|
||||
_textObject = nil;
|
||||
|
||||
textMovement = [[aNotification userInfo] objectForKey: @"NSTextMovement"];
|
||||
if (textMovement)
|
||||
{
|
||||
|
|
|
@ -5886,7 +5886,6 @@ byExtendingSelection: (BOOL)flag
|
|||
|
||||
for (i = startingRow; i <= endingRow; i++)
|
||||
{
|
||||
|
||||
[_backgroundColor set];
|
||||
NSRectFill (localBackground);
|
||||
[self highlightSelectionInClipRect: localBackground];
|
||||
|
@ -6035,13 +6034,6 @@ byExtendingSelection: (BOOL)flag
|
|||
|
||||
[self validateEditing];
|
||||
|
||||
d = [[NSMutableDictionary alloc] initWithDictionary:
|
||||
[aNotification userInfo]];
|
||||
[d setObject: [aNotification object] forKey: @"NSFieldEditor"];
|
||||
[nc postNotificationName: NSControlTextDidEndEditingNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
|
||||
[_editedCell endEditing: [aNotification object]];
|
||||
[self setNeedsDisplayInRect:
|
||||
[self frameOfCellAtColumn: _editedColumn row: _editedRow]];
|
||||
|
@ -6055,6 +6047,13 @@ byExtendingSelection: (BOOL)flag
|
|||
_editedColumn = -1;
|
||||
_editedRow = -1;
|
||||
|
||||
d = [[NSMutableDictionary alloc] initWithDictionary:
|
||||
[aNotification userInfo]];
|
||||
[d setObject: [aNotification object] forKey: @"NSFieldEditor"];
|
||||
[nc postNotificationName: NSControlTextDidEndEditingNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
|
||||
textMovement = [[aNotification userInfo] objectForKey: @"NSTextMovement"];
|
||||
if (textMovement)
|
||||
{
|
||||
|
|
|
@ -280,8 +280,7 @@ static Class textFieldCellClass;
|
|||
if ([self isSelectable] == NO)
|
||||
return;
|
||||
|
||||
// This could happen if someone pressed the mouse
|
||||
// on the borders
|
||||
/* This could happen if someone pressed the mouse on the borders. */
|
||||
if (_text_object)
|
||||
return;
|
||||
|
||||
|
@ -306,6 +305,7 @@ static Class textFieldCellClass;
|
|||
delegate: self
|
||||
event: theEvent];
|
||||
}
|
||||
|
||||
- (BOOL) acceptsFirstMouse: (NSEvent *)aEvent
|
||||
{
|
||||
return YES;
|
||||
|
@ -453,14 +453,14 @@ static Class textFieldCellClass;
|
|||
|
||||
[self validateEditing];
|
||||
|
||||
[_cell endEditing: [aNotification object]];
|
||||
|
||||
d = [NSDictionary dictionaryWithObject: [aNotification object]
|
||||
forKey: @"NSFieldEditor"];
|
||||
[nc postNotificationName: NSControlTextDidEndEditingNotification
|
||||
object: self
|
||||
userInfo: d];
|
||||
|
||||
[_cell endEditing: [aNotification object]];
|
||||
|
||||
textMovement = [[aNotification userInfo] objectForKey: @"NSTextMovement"];
|
||||
if (textMovement)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue