mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
implemented changes suggested by review
This commit is contained in:
parent
1821d34ff2
commit
ebafa1786d
2 changed files with 10 additions and 19 deletions
|
@ -120,12 +120,7 @@
|
|||
|
||||
- (void) performFindPanelAction: (id)sender
|
||||
{
|
||||
if (_finder == nil)
|
||||
{
|
||||
_finder = [[GSTextFinder alloc] init];
|
||||
}
|
||||
[self performAction: [sender tag]];
|
||||
[self validateUserInterfaceAction: sender];
|
||||
}
|
||||
|
||||
- (void) performAction: (NSTextFinderAction)op
|
||||
|
|
|
@ -93,7 +93,6 @@
|
|||
#import "AppKit/NSTextStorage.h"
|
||||
#import "AppKit/NSTextView.h"
|
||||
#import "AppKit/NSWindow.h"
|
||||
#import "AppKit/NSStringDrawing.h"
|
||||
|
||||
#import "GSGuiPrivate.h"
|
||||
#import "GSTextFinder.h"
|
||||
|
@ -6139,21 +6138,18 @@ configuation! */
|
|||
NSUInteger rectCount = 0;
|
||||
NSRect *rects;
|
||||
NSMutableArray *result = [NSMutableArray array];
|
||||
NSUInteger idx = 0;
|
||||
|
||||
rects = [_layoutManager rectArrayForCharacterRange: range
|
||||
withinSelectedCharacterRange: NSMakeRange(NSNotFound, 0)
|
||||
inTextContainer: _textContainer
|
||||
rectCount: &rectCount];
|
||||
|
||||
if (_layoutManager)
|
||||
for (idx = 0; idx < rectCount; idx++)
|
||||
{
|
||||
NSUInteger idx = 0;
|
||||
rects = [_layoutManager rectArrayForCharacterRange: range
|
||||
withinSelectedCharacterRange: NSMakeRange(NSNotFound, 0)
|
||||
inTextContainer: _textContainer
|
||||
rectCount: &rectCount];
|
||||
|
||||
for(idx = 0; idx < rectCount; idx++)
|
||||
{
|
||||
NSRect r = rects[idx];
|
||||
NSValue *v = [NSValue valueWithRect: r];
|
||||
[result addObject: v];
|
||||
}
|
||||
NSRect r = rects[idx];
|
||||
NSValue *v = [NSValue valueWithRect: r];
|
||||
[result addObject: v];
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in a new issue