* Source/NSTextView.m: Don't update the selection when dragging a

NSColorPboardType.



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24191 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Matt Rice 2006-12-06 23:58:36 +00:00
parent a04d0da09c
commit 0c74ad4ec6
2 changed files with 15 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2006-12-06 Matt Rice <ratmice@gmail.com>
* Source/NSTextView.m: Don't update the selection when dragging a
NSColorPboardType.
2006-12-03 Adam Fedor <fedor@gnu.org>
* Documentation/manual/: New AppKit manual.

View file

@ -4235,7 +4235,8 @@ other than copy/paste or dragging. */
restrictedToTypesFromArray: types];
unsigned int flags = [self dragOperationForDraggingInfo: sender type: type];
if (flags != NSDragOperationNone)
if (flags != NSDragOperationNone
&& ![type isEqual:NSColorPboardType])
{
NSPoint dragPoint;
unsigned dragIndex;
@ -4269,7 +4270,8 @@ other than copy/paste or dragging. */
restrictedToTypesFromArray: types];
unsigned int flags = [self dragOperationForDraggingInfo: sender type: type];
if (flags != NSDragOperationNone)
if (flags != NSDragOperationNone
&& ![type isEqual:NSColorPboardType])
{
NSPoint dragPoint;
unsigned dragIndex;
@ -4297,7 +4299,12 @@ other than copy/paste or dragging. */
- (void) draggingExited: (id <NSDraggingInfo>)sender
{
if (_tf.isDragTarget == YES)
NSPasteboard *pboard = [sender draggingPasteboard];
NSArray *types = [self readablePasteboardTypes];
NSString *type = [self preferredPasteboardTypeFromArray: [pboard types]
restrictedToTypesFromArray: types];
if (_tf.isDragTarget == YES
&& ![type isEqual:NSColorPboardType])
{
_tf.isDragTarget = NO;
[self setSelectedRange: _dragTargetSelectionRange];