aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPConnectionControllerDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-10-08 14:26:01 +0000
committerrowanbeentje <rowan@beent.je>2012-10-08 14:26:01 +0000
commitc55ffebc406d7d2af3c71b2dace3ec7e3238fd55 (patch)
tree24bd96933a185e5e1fc4629c221b20df2c933330 /Source/SPConnectionControllerDelegate.m
parent051e606e86cb7817defc2ecb2cf4efb7c6444e4c (diff)
downloadsequelpro-c55ffebc406d7d2af3c71b2dace3ec7e3238fd55.tar.gz
sequelpro-c55ffebc406d7d2af3c71b2dace3ec7e3238fd55.tar.bz2
sequelpro-c55ffebc406d7d2af3c71b2dace3ec7e3238fd55.zip
- Fix the Quick Connect entry on the connection screen being a drag and drop target
- Speculative fix for 10.6 & 10.5 connection screen padding/layout issues
Diffstat (limited to 'Source/SPConnectionControllerDelegate.m')
-rw-r--r--Source/SPConnectionControllerDelegate.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPConnectionControllerDelegate.m b/Source/SPConnectionControllerDelegate.m
index 71ad1390..eee6f44d 100644
--- a/Source/SPConnectionControllerDelegate.m
+++ b/Source/SPConnectionControllerDelegate.m
@@ -303,7 +303,10 @@ static NSString *SPQuickConnectImageWhite = @"quick-connect-icon-white.pdf";
- (NSDragOperation)outlineView:(NSOutlineView *)outlineView validateDrop:(id <NSDraggingInfo>)info proposedItem:(id)item proposedChildIndex:(NSInteger)childIndex
{
NSDragOperation result = NSDragOperationNone;
-
+
+ // Prevent the top level or the quick connect item from being a target
+ if (!item || item == quickConnectItem) return result;
+
// Prevent dropping favorites on other favorites (non-groups)
if ((childIndex == NSOutlineViewDropOnItemIndex) && (![item isGroup])) return result;