mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Only set table view’s row height during sizeToFit
The initial dimension of the OakChoiceMenu could be incorrect because the row height had not been updated.
This broke in c270b0c5af
This commit is contained in:
@@ -43,6 +43,8 @@ enum action_t { kActionNop, kActionTab, kActionReturn, kActionCancel, kActionMov
|
||||
CGFloat const kScrollBarWidth = 15;
|
||||
|
||||
NSTextField* textField = OakCreateLabel(@"", self.font, NSLeftTextAlignment, NSLineBreakByTruncatingTail);
|
||||
tableView.rowHeight = NSHeight(textField.frame);
|
||||
|
||||
CGFloat width = 60;
|
||||
for(NSInteger i = 0; i < MIN(_choices.count, 256); ++i)
|
||||
{
|
||||
@@ -127,8 +129,6 @@ enum action_t { kActionNop, kActionTab, kActionReturn, kActionCancel, kActionMov
|
||||
if(!res)
|
||||
{
|
||||
res = OakCreateLabel(@"", self.font, NSLeftTextAlignment, NSLineBreakByTruncatingTail);
|
||||
[res sizeToFit];
|
||||
aTableView.rowHeight = NSHeight(res.frame);
|
||||
res.identifier = identifier;
|
||||
}
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user