On March 16, 2011, 7:30 a.m., Seth ProductEngine wrote:
> > So the new method might become something like
> > 
> > void LLExpandableTextBox::LLTextBoxEx::hideOrShowExpandTextAsNeeded()
> > {
> >     // Restore the text box contents to calculate the text height properly,
> >     // otherwise if a part of the text is hidden under "More" link
> >     // getTextPixelHeight() returns only the height of currently visible 
> > text
> >     // including the "More" link.
> >     hideExpandText();
> > 
> >     // Show the expander if we need it, depending on text
> >     // contents height. If not, keep it hidden.
> >     if (getTextPixelHeight() > getRect().getHeight())
> >     {
> >             showExpandText();
> >     }
> > }

Yes, there's no need to call hideExpandText() for two times is a row. I like 
this version of hideOrShowExpandTextAsNeeded(). Thanks!


- Seth


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://codereview.secondlife.com/r/198/#review465
-----------------------------------------------------------


On March 16, 2011, 5:19 p.m., Seth ProductEngine wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://codereview.secondlife.com/r/198/
> -----------------------------------------------------------
> 
> (Updated March 16, 2011, 5:19 p.m.)
> 
> 
> Review request for Viewer.
> 
> 
> Summary
> -------
> 
> Fixed "More" link being toggled in expandable textbox after reshaping.
> 
> 
> This addresses bug STORM-250.
>     http://jira.secondlife.com/browse/STORM-250
> 
> 
> Diffs
> -----
> 
>   indra/newview/llexpandabletextbox.h b761ed94eb26 
>   indra/newview/llexpandabletextbox.cpp b761ed94eb26 
> 
> Diff: http://codereview.secondlife.com/r/198/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Seth
> 
>

_______________________________________________
Policies and (un)subscribe information available here:
http://wiki.secondlife.com/wiki/OpenSource-Dev
Please read the policies before posting to keep unmoderated posting privileges

Reply via email to