mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 15:00:38 +00:00
* Source/NSPrintOperation.m: Correct issues with handling of
rectangle passed back from rectForPage: callback in NSView subclasses. This rect should override existing calculations when it is passed in. * Source/NSView.m: Change to use NSPrintPaperBounds if and only if aRect is passed in as a blank rect. Previously the code was using the NSPrintPaperBounds value and ignoring the passed in value. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28071 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
500c32c7be
commit
83e65b773e
3 changed files with 39 additions and 10 deletions
|
@ -4247,11 +4247,16 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
NSGraphicsContext *ctxt = [printOp context];
|
||||
NSDictionary *dict = [[printOp printInfo] dictionary];
|
||||
|
||||
if ([dict objectForKey: @"NSPrintPaperBounds"])
|
||||
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
||||
if (NSIsEmptyRect(aRect))
|
||||
{
|
||||
if ([dict objectForKey: @"NSPrintPaperBounds"])
|
||||
bounds = [[dict objectForKey: @"NSPrintPaperBounds"] rectValue];
|
||||
}
|
||||
else
|
||||
bounds = aRect;
|
||||
|
||||
{
|
||||
bounds = aRect;
|
||||
}
|
||||
|
||||
nup = [[dict objectForKey: NSPrintPagesPerSheet] intValue];
|
||||
if (nup > 1)
|
||||
{
|
||||
|
@ -4285,7 +4290,7 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
}
|
||||
|
||||
/* Translate to placement */
|
||||
if (location.x != 0 || location.y != 0)
|
||||
if (location.x != 0 || location.y != 0 && NSIsEmptyRect(aRect) == YES)
|
||||
DPStranslate(ctxt, location.x, location.y);
|
||||
|
||||
// FIXME: Need to place this correctly. Maybe it isn't needed at all,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue