mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
* Source/NSOutlineView (-mouseDown:): Check item expandability before
expanding or collapsing. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24477 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
558ed99fb9
commit
c5877cd433
2 changed files with 15 additions and 7 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-02-05 Matt Rice <ratmice@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSOutlineView (-mouseDown:): Check item expandability before
|
||||||
|
expanding or collapsing.
|
||||||
|
|
||||||
2007-02-05 Fred Kiefer <FredKiefer@gmx.de>
|
2007-02-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSMenuItem.h: Add MacOS 10.3 methods and
|
* Headers/AppKit/NSMenuItem.h: Add MacOS 10.3 methods and
|
||||||
|
|
|
@ -836,11 +836,12 @@ static NSImage *unexpandable = nil;
|
||||||
&& [_tableColumns objectAtIndex: _clickedColumn] == _outlineTableColumn)
|
&& [_tableColumns objectAtIndex: _clickedColumn] == _outlineTableColumn)
|
||||||
{
|
{
|
||||||
NSImage *image;
|
NSImage *image;
|
||||||
|
|
||||||
|
id item = [self itemAtRow:_clickedRow];
|
||||||
int level = [self levelForRow: _clickedRow];
|
int level = [self levelForRow: _clickedRow];
|
||||||
int position = 0;
|
int position = 0;
|
||||||
|
|
||||||
if ([self isItemExpanded: [self itemAtRow: _clickedRow]])
|
if ([self isItemExpanded: item])
|
||||||
{
|
{
|
||||||
image = expanded;
|
image = expanded;
|
||||||
}
|
}
|
||||||
|
@ -856,15 +857,17 @@ static NSImage *unexpandable = nil;
|
||||||
|
|
||||||
position += _columnOrigins[_clickedColumn];
|
position += _columnOrigins[_clickedColumn];
|
||||||
|
|
||||||
if (location.x >= position && location.x <= position + [image size].width)
|
if ([self isExpandable:item]
|
||||||
|
&& location.x >= position
|
||||||
|
&& location.x <= position + [image size].width)
|
||||||
{
|
{
|
||||||
if (![self isItemExpanded: [self itemAtRow: _clickedRow]])
|
if (![self isItemExpanded: item])
|
||||||
{
|
{
|
||||||
[self expandItem: [self itemAtRow: _clickedRow]];
|
[self expandItem: item];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[self collapseItem: [self itemAtRow: _clickedRow]];
|
[self collapseItem: item];
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue