aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2012-04-02 23:14:33 +0000
committerrowanbeentje <rowan@beent.je>2012-04-02 23:14:33 +0000
commit8b83ed0f73105074239c9c083be343ad6a836ec0 (patch)
tree4baa43c793316665295339c86aa8a5b3f094d90c /Frameworks
parent09ed4be7e668dc10e0c4ca9178f8e1c414997b57 (diff)
downloadsequelpro-8b83ed0f73105074239c9c083be343ad6a836ec0.tar.gz
sequelpro-8b83ed0f73105074239c9c083be343ad6a836ec0.tar.bz2
sequelpro-8b83ed0f73105074239c9c083be343ad6a836ec0.zip
- Improve mouse tracking logic in PSMTabBar, fixing dragging issues (Issue #1003)
Diffstat (limited to 'Frameworks')
-rw-r--r--Frameworks/PSMTabBar/PSMTabBarControl.m9
1 files changed, 8 insertions, 1 deletions
diff --git a/Frameworks/PSMTabBar/PSMTabBarControl.m b/Frameworks/PSMTabBar/PSMTabBarControl.m
index 416b10d8..2a92a2b1 100644
--- a/Frameworks/PSMTabBar/PSMTabBarControl.m
+++ b/Frameworks/PSMTabBar/PSMTabBarControl.m
@@ -1354,7 +1354,7 @@
- (void)mouseDragged:(NSEvent *)theEvent
{
- if ([self lastMouseDownEvent] == nil) {
+ if (![self lastMouseDownEvent]) {
return;
}
@@ -1412,6 +1412,10 @@
- (void)mouseUp:(NSEvent *)theEvent
{
+ if (![self lastMouseDownEvent]) {
+ return;
+ }
+
if (_resizing) {
_resizing = NO;
[[NSCursor arrowCursor] set];
@@ -1460,6 +1464,9 @@
_closeClicked = NO;
}
+
+ // Clear the last mouse down event to prevent drag issues
+ [self setLastMouseDownEvent:nil];
}
- (NSMenu *)menuForEvent:(NSEvent *)event