diff options
Diffstat (limited to 'Frameworks/PSMTabBar/PSMTabDragAssistant.m')
-rw-r--r-- | Frameworks/PSMTabBar/PSMTabDragAssistant.m | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabDragAssistant.m b/Frameworks/PSMTabBar/PSMTabDragAssistant.m index 7ebada1a..1e7b22a1 100644 --- a/Frameworks/PSMTabBar/PSMTabDragAssistant.m +++ b/Frameworks/PSMTabBar/PSMTabDragAssistant.m @@ -810,6 +810,9 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; // Determine the index of the tab the dragged tab is over NSUInteger overCellIndex = [cells indexOfObject:overCell]; + + // Determine the index of the current target + NSUInteger currentTargetCellIndex = _targetCell?[cells indexOfObject:_targetCell]:NSUIntegerMax; // Ensure that drag changes aren't as a result of an animation NSInteger currentCellStep = [[cells objectAtIndex:(overCellIndex - 1)] currentStep]; @@ -817,7 +820,7 @@ static PSMTabDragAssistant *sharedDragAssistant = nil; // Center of the tab is past the edge of the tab to the left if (targetPoint.x < (overCellRect.origin.x + overCellRect.size.width) - && targetPoint.x > (overCellRect.origin.x + overCellRect.size.width/2.0)) + && currentTargetCellIndex > overCellIndex) { [self setTargetCell:[cells objectAtIndex:(overCellIndex - 1)]]; |