From ec277286b0200cf5c36c4bb2ef11cb5fd9b31a67 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Sat, 14 Apr 2012 16:45:17 +0000 Subject: - Fix a number of small memory leaks --- Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'Frameworks/PSMTabBar/Styles') diff --git a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m index b28fbbf8..b0a96ccd 100644 --- a/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m +++ b/Frameworks/PSMTabBar/Styles/PSMSequelProTabStyle.m @@ -655,21 +655,10 @@ { NSRect cellFrame = [cell frame]; CGFloat insetLabelWidth = 0; - BOOL tabBarIsRightOfSelectedTab = NO; - - // Determine if the selected tab is right of this tab - for (PSMTabBarCell *aCell in [tabBar cells]) { - if (aCell == cell) break; - if ([aCell state] == NSOnState) { - tabBarIsRightOfSelectedTab = YES; - break; - } - } - + // close button if ([cell hasCloseButton] && ![cell isCloseButtonSuppressed] && [cell isHighlighted]) { - NSSize closeButtonSize = NSZeroSize; NSRect closeButtonRect = [cell closeButtonRectForFrame:cellFrame]; NSImage * closeButton = nil; @@ -677,9 +666,7 @@ if ([cell closeButtonOver]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonOver : sequelProCloseButtonOver; if ([cell closeButtonPressed]) closeButton = [cell isEdited] ? sequelProCloseDirtyButtonDown : sequelProCloseButtonDown; - - closeButtonSize = [closeButton size]; - + if ([controlView isFlipped]) { closeButtonRect.origin.y += closeButtonRect.size.height; } -- cgit v1.2.3