From 50f9c1a0971ba9b8b8fa375f4195dcd69570ef98 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Wed, 24 Mar 2004 19:56:40 +0000 Subject: [PATCH] Implement cool slideback if a menu is already in the document. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18884 72102866-910b-0410-8b05-ffd578937521 --- GormPalettesManager.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/GormPalettesManager.m b/GormPalettesManager.m index 38b8d619..c4079695 100644 --- a/GormPalettesManager.m +++ b/GormPalettesManager.m @@ -163,6 +163,7 @@ static NSImage *dragImage = nil; id obj; NSPasteboard *pb; NSImageRep *rep; + NSMenu *menu; if (view == self || view == nil) { @@ -195,6 +196,8 @@ static NSImage *dragImage = nil; ASSIGN(dragPb, pb); [active copyObject: obj type: type toPasteboard: pb]; NSDebugLog(@"type: %@, obj: %@,", type, obj); + + menu = [active objectForName: @"NSMenu"]; [self dragImage: dragImage at: rect.origin @@ -203,7 +206,7 @@ static NSImage *dragImage = nil; pasteboard: pb source: self slideBack: ([type isEqual: IBWindowPboardType] || - [type isEqual: IBMenuPboardType]) ? NO : YES]; + ([type isEqual: IBMenuPboardType] && menu == nil)) ? NO : YES]; } @end