From 1235c3b6502a1536ebf2931a9ad75deae1c5bf66 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Fri, 24 Sep 2010 23:17:25 +0900 Subject: [PATCH] Hopefully fix the flush control and second screen placement. --- tools/Forge/Bundles/MapEdit/QuakeEd.m | 10 ++++++---- tools/Forge/Bundles/MapEdit/XYView.m | 4 ++++ tools/Forge/Bundles/MapEdit/ZView.m | 4 ++++ 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/tools/Forge/Bundles/MapEdit/QuakeEd.m b/tools/Forge/Bundles/MapEdit/QuakeEd.m index d536e4f01..07c58febd 100644 --- a/tools/Forge/Bundles/MapEdit/QuakeEd.m +++ b/tools/Forge/Bundles/MapEdit/QuakeEd.m @@ -244,8 +244,8 @@ instance draw the brush after each flush return self; // don't lock focus before nib is // finished loading - // if (_flushDisabled) - // return self; + if (_disableFlushWindow) + return self; [cameraview_i lockFocus]; if (clearinstance) { @@ -378,9 +378,11 @@ App delegate methods // go to my second monitor screens =[NSScreen screens]; if ([screens count] == 2) { + NSRect frm; scrn =[screens objectAtIndex:1]; - // XXX [self moveTopLeftTo:0 : [scrn frame].size.height - // XXX screen:scrn]; + frm = [scrn frame]; + [self setFrameTopLeftPoint: NSMakePoint (frm.origin.x, + frm.size.height)]; } [self makeKeyAndOrderFront:self]; diff --git a/tools/Forge/Bundles/MapEdit/XYView.m b/tools/Forge/Bundles/MapEdit/XYView.m index 263ed5113..499a6a02e 100644 --- a/tools/Forge/Bundles/MapEdit/XYView.m +++ b/tools/Forge/Bundles/MapEdit/XYView.m @@ -171,6 +171,7 @@ initWithFrame: // redisplay everything // size this view + [quakeed_i disableFlushWindow]; [self setFrame:sframe bounds:bounds scale:NSMakeSize (scale, scale)]; // scroll the clip view @@ -179,6 +180,7 @@ initWithFrame: [cv setBoundsOrigin:pt]; [scrollview_i reflectScrolledClipView: cv]; + [quakeed_i enableFlushWindow]; [scrollview_i display]; return self; } @@ -248,8 +250,10 @@ If realbounds has shrunk, nothing will change. sframe.size.height *= scale; // size this view + [quakeed_i disableFlushWindow]; [self setFrame:sframe bounds:bounds scale:NSMakeSize (scale, scale)]; + [quakeed_i enableFlushWindow]; [scrollview_i reflectScrolledClipView:[scrollview_i contentView]]; return self; } diff --git a/tools/Forge/Bundles/MapEdit/ZView.m b/tools/Forge/Bundles/MapEdit/ZView.m index 9707b632e..48d63ef81 100644 --- a/tools/Forge/Bundles/MapEdit/ZView.m +++ b/tools/Forge/Bundles/MapEdit/ZView.m @@ -126,6 +126,7 @@ setOrigin:scale: sframe.size.height *= scale; // size this view + [quakeed_i disableFlushWindow]; [self setFrame:sframe bounds:bounds scale:NSMakeSize (1, scale)]; // scroll and scale the clip view @@ -133,6 +134,7 @@ setOrigin:scale: pt.y *= scale; [_super_view setBoundsOrigin: pt]; + [quakeed_i enableFlushWindow]; [zscrollview_i display]; return self; @@ -263,10 +265,12 @@ If realbounds has shrunk, nothing will change. sframe.size.height *= scale; // size this view + [quakeed_i disableFlushWindow]; [self setFrame:sframe bounds:bounds scale:NSMakeSize (1, scale)]; [[_super_view superview] reflectScrolledClipView: cv]; + [quakeed_i enableFlushWindow]; [[zscrollview_i verticalScroller] display]; return self;