Opened 10 years ago

Closed 10 years ago

#3023 closed bug (invalid)

BTextView::LineAt() and BTextView::CountLines() behavior is incorrect

Reported by: anevilyak Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Interface Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All


These functions are supposed to return data based off the original configuration of the text inserted into the BTextView (i.e. hard line breaks). Ours however is basing it off the result after line breaking to wrap to the view boundary. This breaks BubbleHelper, which relies on the original line widths to decide how to resize its tooltip window.

Change History (1)

comment:1 Changed 10 years ago by anevilyak

Resolution: invalid
Status: newclosed

Turns out this isn't entirely the case, it was a difference in SetWordWrap() behavior that was causing the problem. Fixed by Stephan in hrev28489. There is still one difference remaining in our behavior though: R5's BTextView counts an empty line, while ours does not: i.e. SetText("This is a test\n"); and then CountLines() on R5 will return 2, while ours returns 1.

Note: See TracTickets for help on using tickets.