mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-10-07 17:43:28 +00:00
_currentEditor from plasq's branch
This commit is contained in:
parent
628a3cfdc8
commit
da37436be1
@ -878,9 +878,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
-(void)_fieldEditCell:(NSCell *)cell row:(int)row column:(int)column {
|
||||
[self selectCell:cell];
|
||||
|
||||
_currentEditor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[cell setUpFieldEditorAttributes:_currentEditor];
|
||||
[_currentEditor retain];
|
||||
NSText *editor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[[cell setUpFieldEditorAttributes:editor] retain];
|
||||
}
|
||||
|
||||
-(void)_selectTextCell:(NSCell *)cell {
|
||||
|
@ -741,10 +741,10 @@ _dataSource);
|
||||
[_editingCell setBackgroundColor:_backgroundColor];
|
||||
|
||||
NSText *oldEditor = _currentEditor;
|
||||
_currentEditor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[_editingCell setUpFieldEditorAttributes:_currentEditor];
|
||||
[_currentEditor retain];
|
||||
[oldEditor release];
|
||||
NSText *editor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[[_editingCell setUpFieldEditorAttributes:editor] retain];
|
||||
|
||||
[oldEditor release];
|
||||
|
||||
if (select == YES)
|
||||
[_editingCell selectWithFrame:_editingFrame inView:self editor:_currentEditor delegate:self start:0 length:[[_editingCell stringValue] length]];
|
||||
|
@ -212,9 +212,8 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
||||
else {
|
||||
if([cell isEditable] || [cell isSelectable]){
|
||||
if(_currentEditor==nil){
|
||||
_currentEditor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[cell setUpFieldEditorAttributes:_currentEditor];
|
||||
[_currentEditor retain];
|
||||
NSText *editor=[[self window] fieldEditor:YES forObject:self];
|
||||
_currentEditor=[[cell setUpFieldEditorAttributes:editor] retain];
|
||||
}
|
||||
|
||||
[cell editWithFrame:[self bounds] inView:self editor:_currentEditor delegate:self event:event];
|
||||
|
Loading…
Reference in New Issue
Block a user