Ignore:
Timestamp:
Dec 10, 2009, 4:44:21 AM (13 years ago)
Author:
livings124
Message:

reset the message index when clearing the log

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/MessageWindowController.m

    r9680 r9698  
    154154        return;
    155155   
    156     static NSUInteger currentIndex = 0;
    157    
    158156    [fLock lock];
    159157   
    160158    NSScroller * scroller = [[fMessageTable enclosingScrollView] verticalScroller];
    161     const BOOL shouldScroll = currentIndex == 0 || [scroller floatValue] == 1.0 || [scroller isHidden]
     159    const BOOL shouldScroll = fCurrentIndex == 0 || [scroller floatValue] == 1.0 || [scroller isHidden]
    162160                                || [scroller knobProportion] == 1.0;
    163161   
     
    176174                                    [NSString stringWithUTF8String: currentMessage->message], @"Message",
    177175                                    [NSDate dateWithTimeIntervalSince1970: currentMessage->when], @"Date",
    178                                     [NSNumber numberWithUnsignedInteger: currentIndex++], @"Index", //more accurate when sorting by date
     176                                    [NSNumber numberWithUnsignedInteger: fCurrentIndex++], @"Index", //more accurate when sorting by date
    179177                                    [NSNumber numberWithInteger: currentMessage->level], @"Level",
    180178                                    name, @"Name",
     
    362360    [fDisplayedMessages removeAllObjects];
    363361    [fMessageTable reloadData];
     362    fCurrentIndex = 0;
    364363   
    365364    [fLock unlock];
Note: See TracChangeset for help on using the changeset viewer.