From f55befd091820c384b27e6facb930bb98eb526c5 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 8 May 2009 18:43:22 -0400 Subject: [PATCH] Tweak the order that the image browser is loaded, make sure it's not still showing the last group of images when it's shown again. --- iPhoto2Ansel/AnselExportController.m | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/iPhoto2Ansel/AnselExportController.m b/iPhoto2Ansel/AnselExportController.m index 3bb47b07d..a21b99b2b 100644 --- a/iPhoto2Ansel/AnselExportController.m +++ b/iPhoto2Ansel/AnselExportController.m @@ -82,6 +82,9 @@ NSString * const TURAnselServerPasswordKey = @"password"; selector: @selector(exportWindowDidBecomeKey:) name: NSWindowDidBecomeKeyNotification object :nil]; + + // Holds gallery's images info for the gallery preview + browserData = [[NSMutableArray alloc] init]; } -(void)dealloc { @@ -101,20 +104,19 @@ NSString * const TURAnselServerPasswordKey = @"password"; #pragma mark Actions - (IBAction)clickViewGallery: (id)sender { - [NSApp beginSheet: mviewGallerySheet - modalForWindow: [self window] - modalDelegate: nil - didEndSelector: nil - contextInfo: nil]; - + [browserData removeAllObjects]; NSMutableArray *images = [currentGallery listImages]; - NSLog(@"%@", images); - browserData = [[NSMutableArray alloc] init]; for (NSDictionary *image in images) { AnselGalleryViewItem *item = [[AnselGalleryViewItem alloc] initWithURL: [NSURL URLWithString: [image objectForKey:@"url"]]]; [browserData addObject: item]; } - + + [NSApp beginSheet: mviewGallerySheet + modalForWindow: [self window] + modalDelegate: nil + didEndSelector: nil + contextInfo: nil]; + [browserView reloadData]; } @@ -224,7 +226,7 @@ NSString * const TURAnselServerPasswordKey = @"password"; } [prefs synchronize]; - + [self updateServersPopupMenu]; [newServer release]; -- 2.11.0