mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
Bug fix for recent change in NSActionCell
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8309 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
96422627fd
commit
af894fe8c4
2 changed files with 13 additions and 6 deletions
|
@ -1262,6 +1262,7 @@ static SEL getSel;
|
|||
{
|
||||
NSText *t = [_window fieldEditor: YES
|
||||
forObject: self];
|
||||
int length;
|
||||
|
||||
if ([t superview] != nil)
|
||||
if ([t resignFirstResponder] == NO)
|
||||
|
@ -1270,6 +1271,8 @@ static SEL getSel;
|
|||
_selectedCell = _cells[row][column];
|
||||
_selectedRow = row;
|
||||
_selectedColumn = column;
|
||||
/* See comment in NSTextField */
|
||||
length = [[_selectedCell stringValue] length];
|
||||
_textObject = [_selectedCell setUpFieldEditorAttributes: t];
|
||||
[_selectedCell selectWithFrame: [self cellFrameAtRow: _selectedRow
|
||||
column: _selectedColumn]
|
||||
|
@ -1277,7 +1280,7 @@ static SEL getSel;
|
|||
editor: _textObject
|
||||
delegate: self
|
||||
start: 0
|
||||
length: [[_selectedCell stringValue] length]];
|
||||
length: length];
|
||||
return _selectedCell;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,19 +127,23 @@ static NSNotificationCenter *nc;
|
|||
{
|
||||
NSText *t = [_window fieldEditor: YES
|
||||
forObject: self];
|
||||
int length;
|
||||
|
||||
if ([t superview] != nil)
|
||||
if ([t resignFirstResponder] == NO)
|
||||
return;
|
||||
|
||||
// [NSCursor hide];
|
||||
/* [self stringValue] generates a call to validateEditing
|
||||
so we need to call it before setting up the _text_object */
|
||||
length = [[self stringValue] length];
|
||||
_text_object = [_cell setUpFieldEditorAttributes: t];
|
||||
[_cell selectWithFrame: _bounds
|
||||
inView: self
|
||||
editor: _text_object
|
||||
delegate: self
|
||||
start: 0
|
||||
length: [[self stringValue] length]];
|
||||
inView: self
|
||||
editor: _text_object
|
||||
delegate: self
|
||||
start: 0
|
||||
length: length];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue