mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
Prevent a crash when -selectedRange is called for an NSTextView
without a layout manager. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29165 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
395f9a293b
commit
425e51363c
2 changed files with 5 additions and 0 deletions
|
@ -4,6 +4,9 @@
|
|||
-shouldChangeTextInRange:replacementString:): Implement coalescing
|
||||
of undo actions for typing events.
|
||||
|
||||
* Source/NSTextView.m (-selectedRange): Prevent crash when the
|
||||
receiver has no layout manager.
|
||||
|
||||
2009-12-23 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/NSTableView.m (-mouseDown:): A single click into a cell
|
||||
|
|
|
@ -2900,6 +2900,8 @@ Scroll so that the beginning of the range is visible.
|
|||
|
||||
- (NSRange) selectedRange
|
||||
{
|
||||
if (!_layoutManager)
|
||||
return NSMakeRange(0, 0);
|
||||
return _layoutManager->_selected_range;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue