mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 10:51:00 +00:00
Fixed bug in getting path when a column had nothing selected in it
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8615 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e9375388ab
commit
84ef87d3d9
1 changed files with 24 additions and 5 deletions
|
@ -630,6 +630,7 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
{
|
{
|
||||||
NSMutableString *s = [_pathSeparator mutableCopy];
|
NSMutableString *s = [_pathSeparator mutableCopy];
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
NSString *string;
|
||||||
|
|
||||||
#if defined NSBTRACE_pathToColumn || defined NSBTRACE_all
|
#if defined NSBTRACE_pathToColumn || defined NSBTRACE_all
|
||||||
fprintf(stderr, "NSBrowser - (NSString *)pathToColumn: %d\n", column);
|
fprintf(stderr, "NSBrowser - (NSString *)pathToColumn: %d\n", column);
|
||||||
|
@ -646,8 +647,22 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
id c = [self selectedCellInColumn: i];
|
id c = [self selectedCellInColumn: i];
|
||||||
|
|
||||||
if (i != 0)
|
if (i != 0)
|
||||||
|
{
|
||||||
[s appendString: _pathSeparator];
|
[s appendString: _pathSeparator];
|
||||||
[s appendString: [c stringValue]];
|
}
|
||||||
|
|
||||||
|
string = [c stringValue];
|
||||||
|
|
||||||
|
if (string == nil)
|
||||||
|
{
|
||||||
|
/* This should happen only when c == nil, in which case it
|
||||||
|
doesn't make sense to go with the path */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[s appendString: string];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* We actually return a mutable string, but that's ok since a mutable
|
* We actually return a mutable string, but that's ok since a mutable
|
||||||
|
@ -1772,8 +1787,12 @@ static float scrollerWidth; // == [NSScroller scrollerWidth]
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_scrollerRect = NSZeroRect;
|
_scrollerRect = NSZeroRect;
|
||||||
|
|
||||||
if (!NSEqualRects(_scrollerRect, [_horizontalScroller frame]))
|
if (!NSEqualRects(_scrollerRect, [_horizontalScroller frame]))
|
||||||
|
{
|
||||||
[_horizontalScroller setFrame: _scrollerRect];
|
[_horizontalScroller setFrame: _scrollerRect];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Columns
|
// Columns
|
||||||
if (_separatesColumns)
|
if (_separatesColumns)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue