Ignore:
Timestamp:
May 21, 2008, 4:32:26 PM (14 years ago)
Author:
livings124
Message:

only "suck" in and out when quicklook-ing when the window is visible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/macosx/Controller.m

    r5878 r5879  
    40574057- (NSRect) quickLookFrameWithURL: (NSURL *) url
    40584058{
    4059     NSString * fullPath = [url path];
    4060     NSRange visibleRows = [fTableView rowsInRect: [fTableView bounds]];
    4061    
    4062     //do in reverse to find torrent before group
    4063     int row;
    4064     for (row = NSMaxRange(visibleRows) - 1; row >= visibleRows.location; row--)
    4065     {
    4066         id item = [fTableView itemAtRow: row];
    4067         if ([item isKindOfClass: [Torrent class]] && [[(Torrent *)item dataLocation] isEqualToString: fullPath])
    4068         {
    4069             NSRect frame = [fTableView rectOfRow: row];
    4070             frame.origin = [fTableView convertPoint: frame.origin toView: nil];
    4071             frame.origin = [fWindow convertBaseToScreen: frame.origin];
    4072             frame.origin.y -= frame.size.height;
    4073             return frame;
     4059    if ([fWindow isVisible])
     4060    {
     4061        NSString * fullPath = [url path];
     4062        NSRange visibleRows = [fTableView rowsInRect: [fTableView bounds]];
     4063       
     4064        //do in reverse to find torrent before group
     4065        int row;
     4066        for (row = NSMaxRange(visibleRows) - 1; row >= visibleRows.location; row--)
     4067        {
     4068            id item = [fTableView itemAtRow: row];
     4069            if ([item isKindOfClass: [Torrent class]] && [[(Torrent *)item dataLocation] isEqualToString: fullPath])
     4070            {
     4071                NSRect frame = [fTableView rectOfRow: row];
     4072                frame.origin = [fTableView convertPoint: frame.origin toView: nil];
     4073                frame.origin = [fWindow convertBaseToScreen: frame.origin];
     4074                frame.origin.y -= frame.size.height;
     4075                return frame;
     4076            }
    40744077        }
    40754078    }
Note: See TracChangeset for help on using the changeset viewer.