mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:50:37 +00:00
Better error checking and documentation
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17638 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ae16e6ab96
commit
bfc26f3c85
6 changed files with 296 additions and 62 deletions
|
@ -6436,7 +6436,7 @@ byExtendingSelection: (BOOL)flag
|
|||
NSPoint p = [sender draggingLocation];
|
||||
NSRect newRect;
|
||||
int row;
|
||||
int quarterPosition;
|
||||
int quarterPosition, positionInRow;
|
||||
int currentRow;
|
||||
unsigned dragOperation;
|
||||
|
||||
|
@ -6460,6 +6460,7 @@ byExtendingSelection: (BOOL)flag
|
|||
[self scrollRowToVisible: currentRow];
|
||||
}
|
||||
|
||||
positionInRow = (int)(p.y - _bounds.origin.y) % (int)_rowHeight;
|
||||
quarterPosition = (p.y - _bounds.origin.y) / _rowHeight * 4.;
|
||||
|
||||
if ((quarterPosition - oldDropRow * 4 <= 2) &&
|
||||
|
@ -6472,8 +6473,17 @@ byExtendingSelection: (BOOL)flag
|
|||
row = (quarterPosition + 2) / 4;
|
||||
}
|
||||
|
||||
currentDropRow = row;
|
||||
currentDropOperation = NSTableViewDropAbove;
|
||||
// Are we in the two middle quarters of the row? Use TableViewDropOn
|
||||
if(positionInRow > _rowHeight/4 && positionInRow <= (3*_rowHeight)/4)
|
||||
{
|
||||
currentDropRow = (int)(p.y - _bounds.origin.y) / (int)_rowHeight;
|
||||
currentDropOperation = NSTableViewDropOn;
|
||||
}
|
||||
else // drop above
|
||||
{
|
||||
currentDropRow = row;
|
||||
currentDropOperation = NSTableViewDropAbove;
|
||||
}
|
||||
|
||||
dragOperation = [sender draggingSourceOperationMask];
|
||||
if ((lastQuarterPosition != quarterPosition)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue