From 14d06e0ef316c2d04092247fef93edb84bd6fb9e Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Sun, 14 Mar 2010 02:59:37 +0000 Subject: [PATCH] remove unnecessary setHidden:'s --- macosx/InfoTrackersViewController.h | 1 - macosx/InfoWindowController.m | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/macosx/InfoTrackersViewController.h b/macosx/InfoTrackersViewController.h index 730bf7a92..6515b739b 100644 --- a/macosx/InfoTrackersViewController.h +++ b/macosx/InfoTrackersViewController.h @@ -46,7 +46,6 @@ - (void) setInfoForTorrents: (NSArray *) torrents; - (void) updateInfo; - - (void) saveViewSize; - (void) clearView; diff --git a/macosx/InfoWindowController.m b/macosx/InfoWindowController.m index 77033fee8..2c1c933f7 100644 --- a/macosx/InfoWindowController.m +++ b/macosx/InfoWindowController.m @@ -215,7 +215,6 @@ typedef enum oldHeight = NSHeight([oldView frame]); //remove old view - [oldView setHidden: YES]; [oldView removeFromSuperview]; } @@ -314,7 +313,7 @@ typedef enum windowRect.origin.y -= difference; windowRect.size.height += difference; - if ([fViewController respondsToSelector: @selector(saveViewSize)]) //a little bit hacky, but avoids an extra required method + if ([fViewController respondsToSelector: @selector(saveViewSize)]) //a little bit hacky, but avoids requiring an extra method { [window setMinSize: NSMakeSize([window minSize].width, NSHeight(windowRect) - NSHeight(viewRect) + TAB_MIN_HEIGHT)]; [window setMaxSize: NSMakeSize(FLT_MAX, FLT_MAX)]; @@ -325,14 +324,12 @@ typedef enum [window setMaxSize: NSMakeSize(FLT_MAX, NSHeight(windowRect))]; } - viewRect.size.width = windowRect.size.width; + viewRect.size.width = NSWidth(windowRect); [view setFrame: viewRect]; [window setFrame: windowRect display: YES animate: oldTabTag != INVALID]; [[window contentView] addSubview: view]; - [view setHidden: NO]; - if ([NSApp isOnSnowLeopardOrBetter] && (fCurrentTabTag == TAB_FILE_TAG || oldTabTag == TAB_FILE_TAG) && ([QLPreviewPanelSL sharedPreviewPanelExists] && [[QLPreviewPanelSL sharedPreviewPanel] isVisible])) [[QLPreviewPanelSL sharedPreviewPanel] reloadData]; -- 2.40.0