mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
NSBrowser selection fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@19612 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e26d3866b5
commit
a24e83cad5
1 changed files with 6 additions and 10 deletions
|
@ -541,6 +541,8 @@ static NSTextFieldCell *titleCell;
|
|||
}
|
||||
else
|
||||
{
|
||||
// Actually it's always called at 0 column
|
||||
[[self matrixInColumn: i] deselectAllCells];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1836,7 +1838,7 @@ static NSTextFieldCell *titleCell;
|
|||
// If the matrix isn't ours then just return
|
||||
if (column < 0 || column > _lastColumnLoaded)
|
||||
return;
|
||||
|
||||
|
||||
a = [sender selectedCells];
|
||||
aCount = [a count];
|
||||
if(aCount == 0)
|
||||
|
@ -1858,16 +1860,9 @@ static NSTextFieldCell *titleCell;
|
|||
|
||||
selectedCellsCount = [selectedCells count];
|
||||
|
||||
if (selectedCellsCount == 0)
|
||||
// Select cells that should be selected
|
||||
if (selectedCellsCount > 0)
|
||||
{
|
||||
// If we should not select the cell then deselect it
|
||||
|
||||
[sender deselectAllCells];
|
||||
}
|
||||
else if (selectedCellsCount < aCount)
|
||||
{
|
||||
[sender deselectSelectedCell];
|
||||
|
||||
enumerator = [selectedCells objectEnumerator];
|
||||
while ((cell = [enumerator nextObject]))
|
||||
[sender selectCell: cell];
|
||||
|
@ -1888,6 +1883,7 @@ static NSTextFieldCell *titleCell;
|
|||
[sender scrollCellToVisibleAtRow: [sender selectedRow] column: 0];
|
||||
}
|
||||
|
||||
[self updateScroller];
|
||||
// Send the action to target
|
||||
[self sendAction];
|
||||
|
||||
|
|
Loading…
Reference in a new issue