diff options
| author | nyamatongwe <devnull@localhost> | 2011-07-10 12:17:12 +1000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-07-10 12:17:12 +1000 |
| commit | 6439702d10a21d26ba7998dd8ccb4e42383acc08 (patch) | |
| tree | b1edd345199e827a28f3c2c833c3840477be6383 | |
| parent | 3495dbec68c10c277edc11ff915d04f78b6405a2 (diff) | |
| download | scintilla-mirror-6439702d10a21d26ba7998dd8ccb4e42383acc08.tar.gz | |
Allow drag to trash to delete.
| -rw-r--r-- | cocoa/ScintillaView.mm | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm index 5c14560a7..5025fe209 100644 --- a/cocoa/ScintillaView.mm +++ b/cocoa/ScintillaView.mm @@ -501,7 +501,19 @@ NSString *SCIUpdateUINotification = @"SCIUpdateUI"; */ - (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL) flag { - return NSDragOperationCopy | NSDragOperationMove; + return NSDragOperationCopy | NSDragOperationMove | NSDragOperationDelete; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * Finished a drag: may need to delete selection. + */ + +- (void)draggedImage:(NSImage *)image endedAt:(NSPoint)screenPoint operation:(NSDragOperation)operation { + if (operation == NSDragOperationDelete) { + mOwner.backend->WndProc(SCI_CLEAR, 0, 0); + } } //-------------------------------------------------------------------------------------------------- |
