Commits

(null)  committed edc1158

My attempt at fixing positioning on 2nd toolbar in sheet

  • Participants
  • Parent commits 0570e0a

Comments (0)

Files changed (1)

File BWSelectableToolbar.m

 	[self setDelegate:self];
 	[self setItemSelectors];
 	
-	if (!inIB && [[[self editableToolbar] _window] isSheet])
+	if (!inIB)// && [[[self editableToolbar] _window] isSheet])
 	{
 		// When using the toolbar in a sheet, the stored window sizes will be 
 		// incorrect because they include the title bar
 		NSSize actualSz = [[[self editableToolbar] _window] frame].size;
 		CGFloat heightDiff = storedSz.height - actualSz.height;
 		
-		for (NSString* identifier in [tempWSBI allKeys])
+		if (heightDiff != 0)
 		{
-			
-			NSSize sz = [[tempWSBI objectForKey:identifier] sizeValue];
-			sz.height -= heightDiff;
-			[tempWSBI setObject:[NSValue valueWithSize:sz] forKey:identifier];
+			for (NSString* identifier in [tempWSBI allKeys])
+			{
+				
+				NSSize sz = [[tempWSBI objectForKey:identifier] sizeValue];
+				sz.height -= heightDiff;
+				[tempWSBI setObject:[NSValue valueWithSize:sz] forKey:identifier];
+				
+			}
+			[helper setWindowSizesByIdentifier:tempWSBI];
 			
 		}
-		[helper setWindowSizesByIdentifier:tempWSBI];
+		
 		
 	}