mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 06:41:12 +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
|
NSText *t = [_window fieldEditor: YES
|
||||||
forObject: self];
|
forObject: self];
|
||||||
|
int length;
|
||||||
|
|
||||||
if ([t superview] != nil)
|
if ([t superview] != nil)
|
||||||
if ([t resignFirstResponder] == NO)
|
if ([t resignFirstResponder] == NO)
|
||||||
|
@ -1270,6 +1271,8 @@ static SEL getSel;
|
||||||
_selectedCell = _cells[row][column];
|
_selectedCell = _cells[row][column];
|
||||||
_selectedRow = row;
|
_selectedRow = row;
|
||||||
_selectedColumn = column;
|
_selectedColumn = column;
|
||||||
|
/* See comment in NSTextField */
|
||||||
|
length = [[_selectedCell stringValue] length];
|
||||||
_textObject = [_selectedCell setUpFieldEditorAttributes: t];
|
_textObject = [_selectedCell setUpFieldEditorAttributes: t];
|
||||||
[_selectedCell selectWithFrame: [self cellFrameAtRow: _selectedRow
|
[_selectedCell selectWithFrame: [self cellFrameAtRow: _selectedRow
|
||||||
column: _selectedColumn]
|
column: _selectedColumn]
|
||||||
|
@ -1277,7 +1280,7 @@ static SEL getSel;
|
||||||
editor: _textObject
|
editor: _textObject
|
||||||
delegate: self
|
delegate: self
|
||||||
start: 0
|
start: 0
|
||||||
length: [[_selectedCell stringValue] length]];
|
length: length];
|
||||||
return _selectedCell;
|
return _selectedCell;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,19 +127,23 @@ static NSNotificationCenter *nc;
|
||||||
{
|
{
|
||||||
NSText *t = [_window fieldEditor: YES
|
NSText *t = [_window fieldEditor: YES
|
||||||
forObject: self];
|
forObject: self];
|
||||||
|
int length;
|
||||||
|
|
||||||
if ([t superview] != nil)
|
if ([t superview] != nil)
|
||||||
if ([t resignFirstResponder] == NO)
|
if ([t resignFirstResponder] == NO)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// [NSCursor hide];
|
// [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];
|
_text_object = [_cell setUpFieldEditorAttributes: t];
|
||||||
[_cell selectWithFrame: _bounds
|
[_cell selectWithFrame: _bounds
|
||||||
inView: self
|
inView: self
|
||||||
editor: _text_object
|
editor: _text_object
|
||||||
delegate: self
|
delegate: self
|
||||||
start: 0
|
start: 0
|
||||||
length: [[self stringValue] length]];
|
length: length];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue