mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 14:10:44 +00:00
Correction for bug which was allowing an entire menu to be dragged into an existing one. This caused an issue.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18885 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
50f9c1a097
commit
772c73fc2c
1 changed files with 13 additions and 0 deletions
|
@ -811,6 +811,19 @@ void _attachAll(NSMenu *menu, id document)
|
|||
items = [document pasteType: IBMenuPboardType
|
||||
fromPasteboard: dragPb
|
||||
parent: edited];
|
||||
|
||||
// Test to see if the first item is a menu, if so reject the drag. If the
|
||||
// first item is a menu item, accept it.
|
||||
if([items count] > 0)
|
||||
{
|
||||
id itemZero = [items objectAtIndex: 0];
|
||||
if([itemZero isKindOfClass: [NSMenu class]])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
// enumerate through the items and add them.
|
||||
enumerator = [items objectEnumerator];
|
||||
while ((item = [enumerator nextObject]) != nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue