git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3683 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-02-10 13:22:23 +00:00
parent 6be55ebec4
commit 289e8029d1
2 changed files with 12 additions and 33 deletions

View file

@ -1,3 +1,7 @@
Wed Feb 10 12:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSClipView.m: Tidy flip-view errors by Benhur
Wed Feb 10 10:32:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSCell.m: ([-copyWithZone:]) Fixed memory leak - was copying

View file

@ -59,8 +59,6 @@
[self addSubview: _documentView];
df = [_documentView frame];
if ([_documentView isFlipped])
df.origin.y += bounds.size.height - df.size.height;
[self setBoundsOrigin: df.origin];
if ([aView respondsToSelector: @selector(backgroundColor)])
[self setBackgroundColor: [(id)aView backgroundColor]];
@ -87,15 +85,6 @@
[self addCursorRect:[self bounds] cursor:_cursor];
}
- (void) resizeSubviewsWithOldSize: (NSSize)old_size
{
[super resizeSubviewsWithOldSize: old_size];
if ([_documentView isFlipped])
{
[self scrollToPoint: bounds.origin];
}
}
- (void) scrollToPoint: (NSPoint)point
{
NSRect originalBounds = [self bounds];
@ -114,7 +103,7 @@
if (NSEqualPoints(originalBounds.origin, newBounds.origin))
return;
if (_copiesOnScroll)
if (_copiesOnScroll && [self window])
{
// copy the portion of the view that is common before and after scrolling.
// then tell docview to draw the exposed parts.
@ -212,19 +201,6 @@
>= documentFrame.size.width - bounds.size.width)
new.x = documentFrame.size.width - bounds.size.width;
if ([_documentView isFlipped])
{
if (documentFrame.size.height <= bounds.size.height)
new.y = documentFrame.origin.y
+ (documentFrame.size.height - bounds.size.height);
else if (proposedNewOrigin.y <= 0)
new.y = 0;
else if (proposedNewOrigin.y
>= documentFrame.size.height - bounds.size.height)
new.y = documentFrame.size.height - bounds.size.height;
}
else
{
if (documentFrame.size.height <= bounds.size.height)
new.y = documentFrame.origin.y;
else if (proposedNewOrigin.y <= documentFrame.origin.y)
@ -232,7 +208,6 @@
else if (proposedNewOrigin.y
>= documentFrame.size.height - bounds.size.height)
new.y = documentFrame.size.height - bounds.size.height;
}
return new;
}