If the alt modifier is pressed when the user expands or collapses an

outline view item expand or collapse all children of the item as well.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@31185 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2010-08-19 16:52:59 +00:00
parent 20abd629f9
commit 11dd73b98a
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2010-08-19 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSOutlineView.m (-mouseDown): If the alt modifier is
pressed when the user expands or collapses an item expand or
collapse all children of the item as well.
2010-08-19 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSDocument.m (-svaveToFile:saveOperation:delegate:...,

View file

@ -843,13 +843,15 @@ static NSImage *unexpandable = nil;
&& location.x >= position
&& location.x <= position + [image size].width)
{
BOOL withChildren =
([theEvent modifierFlags] & NSAlternateKeyMask) ? YES : NO;
if (![self isItemExpanded: item])
{
[self expandItem: item];
[self expandItem: item expandChildren: withChildren];
}
else
{
[self collapseItem: item];
[self collapseItem: item collapseChildren: withChildren];
}
return;
}