mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Changes selection when new document is selected.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@19450 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bf62865daa
commit
c36e445255
3 changed files with 19 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-06-03 00:43 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormDocument.h: Added "lastEditor" ivar to hold the last editor
|
||||
selected by the document.
|
||||
* GormDocument.m: In [GormDocument setDocumentActive:] used
|
||||
lastEditor to reset the selection to the current one for the document
|
||||
selected. This causes the inspector to switch to the appropriate
|
||||
inspector for the object currently being edited in that document.
|
||||
|
||||
2004-06-03 00:43 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Gorm.m: Removed code in the testInterface: method to allow
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
NSMutableArray *hidden;
|
||||
NSMutableArray *openEditors;
|
||||
NSToolbar *toolbar;
|
||||
id lastEditor;
|
||||
}
|
||||
- (void) addConnector: (id<IBConnectors>)aConnector;
|
||||
- (NSArray*) allConnectors;
|
||||
|
|
|
@ -2896,6 +2896,14 @@ static NSImage *classesImage = nil;
|
|||
[obj display];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Reset the selection to the current selection held by the current
|
||||
// selection owner of this document when the document becomes active.
|
||||
// This allows the app to switch to the correct inspector when the new
|
||||
// document is selected.
|
||||
//
|
||||
[self setSelectionFromEditor: lastEditor];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2920,6 +2928,7 @@ static NSImage *classesImage = nil;
|
|||
{
|
||||
NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
|
||||
NSDebugLog(@"setSelectionFromEditor %@", anEditor);
|
||||
lastEditor = anEditor;
|
||||
if ([(NSObject *)anEditor respondsToSelector: @selector(window)])
|
||||
{
|
||||
[[anEditor window] makeFirstResponder: (id)anEditor];
|
||||
|
|
Loading…
Reference in a new issue