mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Correction for bug#13838.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21503 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3d4490ef38
commit
bdc52169e7
3 changed files with 81 additions and 13 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-07-19 00:35 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/GormNSPanel.m
|
||||
* Palettes/1Windows/GormNSWindow.m: Removed override for
|
||||
orderWindow:... added sendEvent: to do the same thing, since
|
||||
it's a little more generic. This corrects bug#13838.
|
||||
|
||||
2005-07-18 23:54 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Palettes/1Windows/GormNSPanel.m
|
||||
|
|
|
@ -110,6 +110,7 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
|||
autoPositionMask = mask;
|
||||
}
|
||||
|
||||
/*
|
||||
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||
{
|
||||
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||
|
@ -128,4 +129,44 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
|||
[editor makeSelectionVisible: YES];
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
{
|
||||
NSView *v;
|
||||
NSEventType type;
|
||||
|
||||
if (!_f.visible && [theEvent type] != NSAppKitDefined)
|
||||
return;
|
||||
|
||||
if (!_f.cursor_rects_valid)
|
||||
{
|
||||
[self resetCursorRects];
|
||||
}
|
||||
|
||||
type = [theEvent type];
|
||||
switch (type)
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
{
|
||||
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||
if([NSApp isConnecting] == NO)
|
||||
{
|
||||
id editor = [document editorForObject: self create: NO];
|
||||
|
||||
// select myself.
|
||||
if([editor respondsToSelector: @selector(selectObjects:)])
|
||||
{
|
||||
[editor selectObjects: [NSArray arrayWithObject: self]];
|
||||
}
|
||||
|
||||
[document setSelectionFromEditor: editor];
|
||||
[editor makeSelectionVisible: YES];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
[super sendEvent: theEvent];
|
||||
}
|
||||
@end
|
||||
|
|
|
@ -132,22 +132,42 @@ static unsigned int defaultStyleMask = NSTitledWindowMask | NSClosableWindowMask
|
|||
autoPositionMask = mask;
|
||||
}
|
||||
|
||||
- (void) orderWindow: (NSWindowOrderingMode)place relativeTo: (int)otherWin
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
{
|
||||
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||
[super orderWindow: place relativeTo: otherWin];
|
||||
if([NSApp isConnecting] == NO)
|
||||
{
|
||||
id editor = [document editorForObject: self create: NO];
|
||||
NSView *v;
|
||||
NSEventType type;
|
||||
|
||||
// select myself.
|
||||
if([editor respondsToSelector: @selector(selectObjects:)])
|
||||
{
|
||||
[editor selectObjects: [NSArray arrayWithObject: self]];
|
||||
}
|
||||
if (!_f.visible && [theEvent type] != NSAppKitDefined)
|
||||
return;
|
||||
|
||||
[document setSelectionFromEditor: editor];
|
||||
[editor makeSelectionVisible: YES];
|
||||
if (!_f.cursor_rects_valid)
|
||||
{
|
||||
[self resetCursorRects];
|
||||
}
|
||||
|
||||
type = [theEvent type];
|
||||
switch (type)
|
||||
{
|
||||
case NSLeftMouseDown:
|
||||
{
|
||||
id<IBDocuments> document = [(id<IB>)NSApp documentForObject: self];
|
||||
if([NSApp isConnecting] == NO)
|
||||
{
|
||||
id editor = [document editorForObject: self create: NO];
|
||||
|
||||
// select myself.
|
||||
if([editor respondsToSelector: @selector(selectObjects:)])
|
||||
{
|
||||
[editor selectObjects: [NSArray arrayWithObject: self]];
|
||||
}
|
||||
|
||||
[document setSelectionFromEditor: editor];
|
||||
[editor makeSelectionVisible: YES];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
[super sendEvent: theEvent];
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue