mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:00:46 +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
18105d809c
commit
fea5ad53ba
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>
|
2007-01-31 Richard Frith-Macdoanld <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/GSFontInfo.m:
|
* Source/GSFontInfo.m:
|
||||||
|
|
|
@ -51,6 +51,11 @@ static NSImage *_pbc_image[2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (BOOL) prefersTrackingUntilMouseUp
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
/**
|
/**
|
||||||
* Initialize a blank cell.
|
* Initialize a blank cell.
|
||||||
|
@ -838,9 +843,10 @@ static NSImage *_pbc_image[2];
|
||||||
if ([[_menu window] isVisible])
|
if ([[_menu window] isVisible])
|
||||||
{
|
{
|
||||||
[self dismissPopUp];
|
[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
|
* Can never get here from a dragging source
|
||||||
* so they need to track in mouse up.
|
* so they need to track in mouse up.
|
||||||
*/
|
*/
|
||||||
|
NSTableColumn *tb;
|
||||||
// FIXME we probably want to return from here
|
NSCell *cell;
|
||||||
// if the cell wants to track until mouse up,
|
|
||||||
// which could cause selections if the mouse leaves the
|
tb = [_tableColumns objectAtIndex: _clickedColumn];
|
||||||
// cell frame?
|
cell = [tb dataCellForRow: _clickedRow];
|
||||||
|
|
||||||
[self _trackCellAtColumn: _clickedColumn
|
[self _trackCellAtColumn: _clickedColumn
|
||||||
row: _clickedRow
|
row: _clickedRow
|
||||||
withEvent: theEvent];
|
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
|
* Since we may have tracked a cell which may have caused
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue