mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 18:31:27 +00:00
[qwaq] Transfer context to new view in proxy
This fixes the broken source window on file change.
This commit is contained in:
parent
2d5df34234
commit
dbb3802740
3 changed files with 12 additions and 2 deletions
|
@ -21,12 +21,16 @@
|
|||
-setView:(View *) view
|
||||
{
|
||||
int state = [self.view state];
|
||||
id<TextContext> context = [self.view context];
|
||||
|
||||
if (state & sfInFocus) {
|
||||
[self.view loseFocus];
|
||||
[self.view hide];
|
||||
}
|
||||
[self.view hide];
|
||||
[self.view setContext:nil];
|
||||
|
||||
self.view = view;
|
||||
[view setContext:context];
|
||||
if (state & sfDrawn) {
|
||||
[view draw];
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ enum {
|
|||
-(int) options;
|
||||
-(int) state;
|
||||
|
||||
-(id<TextContext>)context;
|
||||
-setContext: (id<TextContext>) context;
|
||||
-draw;
|
||||
-hide;
|
||||
|
|
|
@ -35,7 +35,12 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- setContext: (id<TextContext>) context
|
||||
-(id<TextContext>)context
|
||||
{
|
||||
return textContext;
|
||||
}
|
||||
|
||||
-setContext: (id<TextContext>) context
|
||||
{
|
||||
textContext = context;
|
||||
return self;
|
||||
|
|
Loading…
Reference in a new issue