mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 18:50:48 +00:00
Fixed replacing a non-flipped document view (such as nil) with a flipped
one (such as a matrix) git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8844 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
74ef8f0bd6
commit
07fb8d7d83
1 changed files with 11 additions and 7 deletions
|
@ -61,8 +61,10 @@
|
||||||
NSNotificationCenter *nc;
|
NSNotificationCenter *nc;
|
||||||
|
|
||||||
if (_documentView == aView)
|
if (_documentView == aView)
|
||||||
return;
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
nc = [NSNotificationCenter defaultCenter];
|
nc = [NSNotificationCenter defaultCenter];
|
||||||
if (_documentView)
|
if (_documentView)
|
||||||
{
|
{
|
||||||
|
@ -72,15 +74,16 @@
|
||||||
|
|
||||||
ASSIGN (_documentView, aView);
|
ASSIGN (_documentView, aView);
|
||||||
|
|
||||||
|
/* Call this before doing anything else ! */
|
||||||
|
_rFlags.flipped_view = [self isFlipped];
|
||||||
|
[self _invalidateCoordinates];
|
||||||
|
|
||||||
if (_documentView)
|
if (_documentView)
|
||||||
{
|
{
|
||||||
NSRect df;
|
NSRect df;
|
||||||
|
|
||||||
[self addSubview: _documentView];
|
[self addSubview: _documentView];
|
||||||
|
|
||||||
/* Call this before setting bounds origin ! */
|
|
||||||
_rFlags.flipped_view = [self isFlipped];
|
|
||||||
|
|
||||||
df = [_documentView frame];
|
df = [_documentView frame];
|
||||||
[self setBoundsOrigin: df.origin];
|
[self setBoundsOrigin: df.origin];
|
||||||
|
|
||||||
|
@ -108,8 +111,6 @@
|
||||||
object: _documentView];
|
object: _documentView];
|
||||||
}
|
}
|
||||||
|
|
||||||
_rFlags.flipped_view = [self isFlipped];
|
|
||||||
|
|
||||||
/* TODO: Adjust the key view loop to include the new document view */
|
/* TODO: Adjust the key view loop to include the new document view */
|
||||||
|
|
||||||
[_super_view reflectScrolledClipView: self];
|
[_super_view reflectScrolledClipView: self];
|
||||||
|
@ -181,7 +182,10 @@
|
||||||
destPoint.x -= dx;
|
destPoint.x -= dx;
|
||||||
destPoint.y -= dy;
|
destPoint.y -= dy;
|
||||||
[self lockFocus];
|
[self lockFocus];
|
||||||
|
|
||||||
|
/* FIXME! copy only an integral rect in device space */
|
||||||
NSCopyBits (0, intersection, destPoint);
|
NSCopyBits (0, intersection, destPoint);
|
||||||
|
|
||||||
[self unlockFocus];
|
[self unlockFocus];
|
||||||
|
|
||||||
/* Change coordinate system to the new one */
|
/* Change coordinate system to the new one */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue