fix behavior of simple click within selected text; optimize setNeedsDisplayInRect: when called with empty rect

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29914 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Doug Simons 2010-03-12 22:50:42 +00:00
parent e01753e955
commit 9b229c81f5
3 changed files with 13 additions and 2 deletions

View file

@ -2721,6 +2721,9 @@ in the main thread.
*/
- (void) setNeedsDisplayInRect: (NSRect)invalidRect
{
if (NSIsEmptyRect(invalidRect))
return; // avoid unnecessary work when rectangle is empty
NSValue *v = [[NSValue alloc]
initWithBytes: &invalidRect
objCType: @encode(NSRect)];