mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
Cleanup printing after exception
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13387 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ba423ff0b8
commit
935e853ceb
3 changed files with 18 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-04-06 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSView.m (-_cleanupPrinting): Private method to cleanup
|
||||
after an exception.
|
||||
* Source/NSPrintOperation.m (-_runOperation): Use it.
|
||||
|
||||
2002-04-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Images/common_RightTabStop.tiff
|
||||
|
|
|
@ -88,6 +88,10 @@ typedef struct _page_info_t {
|
|||
- (void) _endSheet;
|
||||
@end
|
||||
|
||||
@interface NSView (NPrintOperationPrivate)
|
||||
- (void) _cleanupPrinting;
|
||||
@end
|
||||
|
||||
// Subclass for the regular printing
|
||||
@interface GSPrintOperation: NSPrintOperation
|
||||
{
|
||||
|
@ -478,6 +482,7 @@ static NSString *NSPrintOperationThreadKey = @"NSPrintOperationThreadKey";
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
[_view _cleanupPrinting];
|
||||
[NSGraphicsContext setCurrentContext: oldContext];
|
||||
NSRunAlertPanel(@"Error", @"Printing error: %@",
|
||||
@"OK", NULL, NULL, localException);
|
||||
|
|
|
@ -3142,6 +3142,13 @@ static NSView* findByTag(NSView *view, int aTag, unsigned *level)
|
|||
viewIsPrinting = nil;
|
||||
}
|
||||
|
||||
/* An exception occured while printing. Clean up */
|
||||
- (void) _cleanupPrinting
|
||||
{
|
||||
[self _invalidateCoordinates];
|
||||
viewIsPrinting = nil;
|
||||
}
|
||||
|
||||
/*
|
||||
* NSCoding protocol
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue