aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m4
-rw-r--r--Frameworks/PSMTabBar/PSMTabDragAssistant.m5
2 files changed, 7 insertions, 2 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 6753bc08..53e48729 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -450,7 +450,9 @@
- (void)setHideForSingleTab:(BOOL)value
{
_hideForSingleTab = value;
- [self update];
+ if ([_cells count] == 1) {
+ [self update];
+ }
}
- (BOOL)showAddTabButton
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)]];