mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 16:40:41 +00:00
Fix NSBrowser so that branch cells are really deselected when multiple
selection is enabled and allowsBranchSelection is set to NO. Also replace the workaround for bug #18881 by a better fix. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29128 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e93f94e5ab
commit
44c81fa9a7
2 changed files with 18 additions and 9 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2009-12-16 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSBrowser.m (-doClick:): Fix NSBrowser so that branch
|
||||||
|
cells are really deselected when multiple selection is enabled and
|
||||||
|
allowsBranchSelection is set to NO. Also replace the workaround
|
||||||
|
for bug #18881 by a better fix.
|
||||||
|
|
||||||
2009-12-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
2009-12-15 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||||
|
|
||||||
* Source/NSSavePanel.m (-ok:): Avoid the bogus warning that was
|
* Source/NSSavePanel.m (-ok:): Avoid the bogus warning that was
|
||||||
|
|
|
@ -533,7 +533,7 @@ static NSTextFieldCell *titleCell;
|
||||||
* implements it). If this call to the delegate returns NO then
|
* implements it). If this call to the delegate returns NO then
|
||||||
* the attempt to set the path fails.<br />
|
* the attempt to set the path fails.<br />
|
||||||
* If the delegate does not implement the method, the browser attempts
|
* If the delegate does not implement the method, the browser attempts
|
||||||
* to locate and select the cell itsself, and the method fails if it
|
* to locate and select the cell itself, and the method fails if it
|
||||||
* is unable to locate the cell by matching its [NSCell-stringValue] with
|
* is unable to locate the cell by matching its [NSCell-stringValue] with
|
||||||
* the component of the path.
|
* the component of the path.
|
||||||
* </p>
|
* </p>
|
||||||
|
@ -2130,19 +2130,21 @@ static NSTextFieldCell *titleCell;
|
||||||
|
|
||||||
selectedCellsCount = [selectedCells count];
|
selectedCellsCount = [selectedCells count];
|
||||||
|
|
||||||
/* FIXME why were we reselecting already selected cells?
|
/* If some branch cells were selected but branch selection is not allowed
|
||||||
* this caused bug #18881 because -selectCell: will scroll the row to visible.
|
reset the selection and select only the leaf cells. It is a pity that
|
||||||
*/
|
we cannot deselect cells individually. */
|
||||||
#if 0
|
if (selectedCellsCount != aCount)
|
||||||
|
|
||||||
// Select cells that should be selected
|
|
||||||
if (selectedCellsCount > 0)
|
|
||||||
{
|
{
|
||||||
|
BOOL autoscroll = [sender isAutoscroll];
|
||||||
|
|
||||||
|
/* Note: Temporarily disable autoscrolling to prevent bug #18881 */
|
||||||
|
[sender setAutoscroll: NO];
|
||||||
|
[sender deselectAllCells];
|
||||||
enumerator = [selectedCells objectEnumerator];
|
enumerator = [selectedCells objectEnumerator];
|
||||||
while ((cell = [enumerator nextObject]))
|
while ((cell = [enumerator nextObject]))
|
||||||
[sender selectCell: cell];
|
[sender selectCell: cell];
|
||||||
|
[sender setAutoscroll: autoscroll];
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
[self setLastColumn: column];
|
[self setLastColumn: column];
|
||||||
// Single selection
|
// Single selection
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue