* Source/NSTableView.m (-mouseDown:): Fix the check that detects

when an unselected row is being dragged.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20115 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2004-09-23 20:36:10 +00:00
parent 11fef998fe
commit d3f517e16b
2 changed files with 8 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2004-09-23 22:33 Alexander Malmberg <alexander@malmberg.org>
* Source/NSTableView.m (-mouseDown:): Fix the check that detects
when an unselected row is being dragged.
2004-09-23 18:01 Alexander Malmberg <alexander@malmberg.org> 2004-09-23 18:01 Alexander Malmberg <alexander@malmberg.org>
* Printing/GSLPR/GSLPRPrintOperation.m (-createContext): Always use * Printing/GSLPR/GSLPRPrintOperation.m (-createContext): Always use

View file

@ -1896,7 +1896,7 @@ _isCellEditable (id delegate, NSArray *tableColumns,
row: row] == NO) row: row] == NO)
{ {
return NO; return NO;
} }
} }
return YES; return YES;
@ -3587,8 +3587,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
{ {
draggingPossible = NO; draggingPossible = NO;
} }
else if (mouseLocationWin.x - initialLocation.x >= 4 else if (fabs(mouseLocationWin.x - initialLocation.x) >= 4)
|| mouseLocationWin.x - initialLocation.x <= -4)
{ {
NSPasteboard *pboard; NSPasteboard *pboard;
NSArray *rows; NSArray *rows;
@ -3596,7 +3595,7 @@ static inline float computePeriod(NSPoint mouseLocationWin,
mouseLocationView.x = _bounds.origin.x; mouseLocationView.x = _bounds.origin.x;
oldRow = currentRow; oldRow = currentRow;
currentRow = [self rowAtPoint: mouseLocationView]; currentRow = [self rowAtPoint: mouseLocationView];
if (oldRow != currentRow) if (![_selectedRows containsIndex: currentRow])
{ {
/* Mouse drag in a row that wasn't selected. /* Mouse drag in a row that wasn't selected.
select the new row before dragging */ select the new row before dragging */
@ -3608,7 +3607,6 @@ static inline float computePeriod(NSPoint mouseLocationWin,
currentRow, currentRow,
&_selectedRow, &_selectedRow,
selectionMode); selectionMode);
} }
rows = [self _selectedRowArray]; rows = [self _selectedRowArray];