Changeset 9325


Ignore:
Timestamp:
Oct 19, 2009, 2:44:04 AM (13 years ago)
Author:
livings124
Message:

add an extra check when determining if the message window should be scrolled to the bottom

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r9297 r9325  
    144144   
    145145    static NSUInteger currentIndex = 0;
     146   
     147    NSScroller * scroller = [[fMessageTable enclosingScrollView] verticalScroller];
     148    const BOOL shouldScroll = currentIndex == 0 || [scroller floatValue] == 1.0 || [scroller isHidden]
     149                                || [scroller knobProportion] == 1.0;
     150   
    146151    for (tr_msg_list * currentMessage = messages; currentMessage != NULL; currentMessage = currentMessage->next)
    147152    {
     
    163168    tr_freeMessageList(messages);
    164169   
    165     NSScroller * scroller = [[fMessageTable enclosingScrollView] verticalScroller];
    166     const BOOL shouldScroll = [scroller floatValue] == 1.0 || [scroller isHidden] || [scroller knobProportion] == 1.0;
    167    
    168170    NSUInteger total = [fMessages count];
    169171    if (total > MAX_MESSAGES)
Note: See TracChangeset for help on using the changeset viewer.