Skip to content
This repository was archived by the owner on Nov 19, 2019. It is now read-only.

Commit 1c6eaae

Browse files
author
Frank Dowsett
committed
Clear highlighted cells when dragging starts.
When automaticallyAnimates is NO, a cell that was highlighted as the drag started did not get reset when the drag completed.
1 parent 902050b commit 1c6eaae

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Source/PSMTabDragAssistant.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ - (void)startDraggingCell:(PSMTabBarCell *)cell fromTabBarControl:(PSMTabBarCont
165165
if([tabBarControl isFlipped]) {
166166
cellFrame.origin.y += cellFrame.size.height;
167167
}
168-
[cell setHighlighted:NO];
168+
169+
//clear all highlights
170+
[[tabBarControl cells] enumerateObjectsUsingBlock:^(id cell, NSUInteger idx, BOOL *stop) {
171+
[cell setHighlighted:NO];
172+
}];
173+
169174
NSSize offset = NSZeroSize;
170175
[pboard declareTypes:[NSArray arrayWithObjects:@"PSMTabBarControlItemPBType", nil] owner: nil];
171176
[pboard setString:[[NSNumber numberWithInteger:[[tabBarControl cells] indexOfObject:cell]] stringValue] forType:@"PSMTabBarControlItemPBType"];

0 commit comments

Comments
 (0)