mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-23 14:30:48 +00:00
Fix issues with active document and menu dismissal when testing
This commit is contained in:
parent
b8dc15cca3
commit
248d81bf74
5 changed files with 17 additions and 6 deletions
|
@ -14,10 +14,6 @@
|
|||
"loadImage:",
|
||||
"loadPallete:",
|
||||
"loadSound:",
|
||||
"newAction11:",
|
||||
"newAction12:",
|
||||
"newAction13:",
|
||||
"newAction14:",
|
||||
"ungroup:",
|
||||
"orderFrontFontPanel:",
|
||||
"palettes:",
|
||||
|
|
Binary file not shown.
|
@ -453,7 +453,8 @@
|
|||
NSString *subClassName;
|
||||
id obj;
|
||||
id savedDelegate = [NSApp delegate];
|
||||
|
||||
NSMenu *modelMenu = [activeDoc objectForName: @"NSMenu"];
|
||||
|
||||
// which windows were open when testing started...
|
||||
testingWindows = [[NSMutableArray alloc] init];
|
||||
en = [[NSApp windows] objectEnumerator];
|
||||
|
@ -581,6 +582,8 @@
|
|||
}
|
||||
}
|
||||
|
||||
[modelMenu close];
|
||||
|
||||
// so we don't get the warning...
|
||||
[NSApp setServicesMenu: nil];
|
||||
[[NSApp mainMenu] display];
|
||||
|
|
|
@ -504,6 +504,7 @@ static NSImage *fileImage = nil;
|
|||
object: aConnector];
|
||||
|
||||
[connections addObject: aConnector];
|
||||
[self touch]; // make sure the doc is marked as modified...
|
||||
|
||||
[nc postNotificationName: IBDidAddConnectorNotification
|
||||
object: aConnector];
|
||||
|
|
|
@ -112,7 +112,18 @@ static NSNotificationCenter *nc = nil;
|
|||
|
||||
- (void) touch: (id)sender
|
||||
{
|
||||
id<IBDocuments> doc = [(id<IB>)NSApp activeDocument];
|
||||
id delegate = [NSApp delegate];
|
||||
id<IBDocuments> doc = nil;
|
||||
|
||||
if ([NSApp respondsToSelector: @selector(activeDocument)])
|
||||
{
|
||||
doc = [(id<IB>)NSApp activeDocument];
|
||||
}
|
||||
else if ([delegate respondsToSelector: @selector(activeDocument)])
|
||||
{
|
||||
doc = [delegate activeDocument];
|
||||
}
|
||||
|
||||
[doc touch];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue