mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
-rowForView: early return if arg is not a CPView. Was causing an error when you click on table whose window was not frontmost.
Simplify -hitTest:, limit select-row behavior to left mouse events and extend to all data views accepting FR.
This commit is contained in:
@@ -1870,6 +1870,9 @@ NOT YET IMPLEMENTED
|
||||
*/
|
||||
- (CPInteger)rowOrColumn:(BOOL)rowOrColumn forView:(CPView)aView
|
||||
{
|
||||
if (![aView isKindOfClass:[CPView class]])
|
||||
return -1;
|
||||
|
||||
var cellView = aView,
|
||||
contentView = [[self window] contentView];
|
||||
|
||||
@@ -4821,10 +4824,10 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
{
|
||||
var hit = [super hitTest:aPoint];
|
||||
|
||||
if (!hit || ![hit isKindOfClass:[CPTextField class]] || [self isRowSelected:[self rowForView:hit]])
|
||||
return hit;
|
||||
if ([[CPApp currentEvent] type] == CPLeftMouseDown && [hit acceptsFirstResponder] && ![self isRowSelected:[self rowForView:hit]])
|
||||
return self;
|
||||
|
||||
return self;
|
||||
return hit;
|
||||
}
|
||||
|
||||
- (void)_startObservingFirstResponder
|
||||
|
||||
Reference in New Issue
Block a user