mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-24 18:31:20 +00:00
Patch for possible string size caching problem for same strings
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37710 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
706eec3f24
commit
c96089be04
1 changed files with 10 additions and 7 deletions
|
@ -176,16 +176,19 @@ static GSAutocompleteWindow *gsWindow = nil;
|
|||
while ((word = [enumerator nextObject]))
|
||||
{
|
||||
if ([word length] > widest)
|
||||
{
|
||||
widest = [word length];
|
||||
widestWord = word;
|
||||
}
|
||||
{
|
||||
widest = [word length];
|
||||
widestWord = word;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// String size caching could cache one of our strings with the wrong sizing
|
||||
widestWord = [NSString stringWithFormat:@"%@#",widestWord];
|
||||
|
||||
// Width
|
||||
cell = [[_tableView tableColumnWithIdentifier: @"content"] dataCell];
|
||||
windowWidth = 1.1*[cell _sizeText: widestWord].width
|
||||
+ [NSScroller scrollerWidth] + 2*bsize.width;
|
||||
windowWidth = ([cell _sizeText: widestWord].width + [NSScroller scrollerWidth] + 2*bsize.width);
|
||||
// windowWidth *= 1.1;
|
||||
|
||||
//Height
|
||||
windowHeight = 2*bsize.height + [_tableView rowHeight]*num
|
||||
|
|
Loading…
Reference in a new issue