mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 12:00:52 +00:00
* Source/NSTableView.m (-mouseDown:): Return early after tracking a
cell which prefersTrackingUntilMouseUp. * Source/NSPopUpButtonCell.m (+prefersTrackingUntilMouseUp:): Return yes. (-trackMouse:inRect:ofView:untilMouseUp:): Return yes or no depending on whether the mouse went up inside the menu or not. Fixes bug #18946 git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24465 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
5dcabf4505
commit
16fcaeab83
3 changed files with 35 additions and 6 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2007-02-04 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
* Source/NSTableView.m (-mouseDown:): Return early after tracking a
|
||||
cell which prefersTrackingUntilMouseUp.
|
||||
* Source/NSPopUpButtonCell.m (+prefersTrackingUntilMouseUp:): Return
|
||||
yes.
|
||||
(-trackMouse:inRect:ofView:untilMouseUp:): Return yes or no
|
||||
depending on whether the mouse went up inside the menu or not.
|
||||
Fixes bug #18946
|
||||
|
||||
2007-01-31 Richard Frith-Macdoanld <rfm@gnu.org>
|
||||
|
||||
* Source/GSFontInfo.m:
|
||||
|
|
|
@ -51,6 +51,11 @@ static NSImage *_pbc_image[2];
|
|||
}
|
||||
}
|
||||
|
||||
+ (BOOL) prefersTrackingUntilMouseUp
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
// Initialization
|
||||
/**
|
||||
* Initialize a blank cell.
|
||||
|
@ -838,9 +843,10 @@ static NSImage *_pbc_image[2];
|
|||
if ([[_menu window] isVisible])
|
||||
{
|
||||
[self dismissPopUp];
|
||||
return NO;
|
||||
}
|
||||
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3703,14 +3703,27 @@ static inline float computePeriod(NSPoint mouseLocationWin,
|
|||
* Can never get here from a dragging source
|
||||
* so they need to track in mouse up.
|
||||
*/
|
||||
|
||||
// FIXME we probably want to return from here
|
||||
// if the cell wants to track until mouse up,
|
||||
// which could cause selections if the mouse leaves the
|
||||
// cell frame?
|
||||
NSTableColumn *tb;
|
||||
NSCell *cell;
|
||||
|
||||
tb = [_tableColumns objectAtIndex: _clickedColumn];
|
||||
cell = [tb dataCellForRow: _clickedRow];
|
||||
|
||||
[self _trackCellAtColumn: _clickedColumn
|
||||
row: _clickedRow
|
||||
withEvent: theEvent];
|
||||
|
||||
if ([[cell class] prefersTrackingUntilMouseUp])
|
||||
{
|
||||
/* the mouse could have gone up outside of the cell
|
||||
* avoid selecting the row under mouse cursor */
|
||||
|
||||
/* FIXME this should really send the action
|
||||
* unfortunately the row isn't currently being
|
||||
* selected so that would send the action on the
|
||||
* wrong row. */
|
||||
return;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Since we may have tracked a cell which may have caused
|
||||
|
|
Loading…
Reference in a new issue