mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:10:47 +00:00
* Source/NSTableView.m:
(-editColumn:row:withEvent:select:): Raise when passed an unselected row. (-textDidEndEditing:): Handle NSReturnTextMovement. (_editNextCellAfterRow:inColumn:): New private method. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24008 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3d20848a26
commit
ece0182c72
2 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2006-11-01 Matt Rice <ratmice@yahoo.com>
|
||||||
|
|
||||||
|
* Source/NSTableView.m:
|
||||||
|
(-editColumn:row:withEvent:select:): Raise when passed an unselected
|
||||||
|
row.
|
||||||
|
(-textDidEndEditing:): Handle NSReturnTextMovement.
|
||||||
|
(_editNextCellAfterRow:inColumn:): New private method.
|
||||||
|
|
||||||
|
|
||||||
2006-11-01 Matt Rice <ratmice@yahoo.com>
|
2006-11-01 Matt Rice <ratmice@yahoo.com>
|
||||||
|
|
||||||
* Source/NSTableView.m: Add new private methods.
|
* Source/NSTableView.m: Add new private methods.
|
||||||
|
|
|
@ -1944,6 +1944,7 @@ static void computeNewSelection
|
||||||
column: (int)column;
|
column: (int)column;
|
||||||
- (BOOL) _editPreviousEditableCellBeforeRow: (int)row
|
- (BOOL) _editPreviousEditableCellBeforeRow: (int)row
|
||||||
column: (int)column;
|
column: (int)column;
|
||||||
|
- (void) _editNextCellAfterRow:(int)row inColumn:(int)column;
|
||||||
- (void) _autosaveTableColumns;
|
- (void) _autosaveTableColumns;
|
||||||
- (void) _autoloadTableColumns;
|
- (void) _autoloadTableColumns;
|
||||||
@end
|
@end
|
||||||
|
@ -3213,6 +3214,12 @@ byExtendingSelection: (BOOL)flag
|
||||||
[self scrollRowToVisible: rowIndex];
|
[self scrollRowToVisible: rowIndex];
|
||||||
[self scrollColumnToVisible: columnIndex];
|
[self scrollColumnToVisible: columnIndex];
|
||||||
|
|
||||||
|
if (rowIndex != _selectedRow)
|
||||||
|
{
|
||||||
|
[NSException raise:NSInvalidArgumentException
|
||||||
|
format:@"Attempted to edit unselected row"];
|
||||||
|
}
|
||||||
|
|
||||||
if (rowIndex < 0 || rowIndex >= _numberOfRows
|
if (rowIndex < 0 || rowIndex >= _numberOfRows
|
||||||
|| columnIndex < 0 || columnIndex >= _numberOfColumns)
|
|| columnIndex < 0 || columnIndex >= _numberOfColumns)
|
||||||
{
|
{
|
||||||
|
@ -4950,6 +4957,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
switch ([(NSNumber *)textMovement intValue])
|
switch ([(NSNumber *)textMovement intValue])
|
||||||
{
|
{
|
||||||
case NSReturnTextMovement:
|
case NSReturnTextMovement:
|
||||||
|
[self _editNextCellAfterRow:row inColumn:column];
|
||||||
// Send action ?
|
// Send action ?
|
||||||
break;
|
break;
|
||||||
case NSTabTextMovement:
|
case NSTabTextMovement:
|
||||||
|
@ -5549,6 +5557,23 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) _editNextCellAfterRow:(int)row inColumn:(int)column
|
||||||
|
{
|
||||||
|
if (++row >= _numberOfColumns)
|
||||||
|
row = 0;
|
||||||
|
|
||||||
|
if ([self _shouldSelectRow:row])
|
||||||
|
{
|
||||||
|
[self selectRowIndexes:[NSIndexSet indexSetWithIndex:row]
|
||||||
|
byExtendingSelection:NO];
|
||||||
|
|
||||||
|
if ([self _isCellEditableColumn:column row:row])
|
||||||
|
{
|
||||||
|
[self editColumn:column row:row withEvent:nil select:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
-(BOOL) _editNextEditableCellAfterRow: (int)row
|
-(BOOL) _editNextEditableCellAfterRow: (int)row
|
||||||
column: (int)column
|
column: (int)column
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue