// Modified by:
// Created: 26.10.99
// RCS-ID: $Id$
-// Copyright: (c) wxWindows team
+// Copyright: (c) wxWidgets team
// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
if ( submenu )
{
submenu->SetParent((wxMenu *)NULL);
+ if ( submenu->IsAttached() )
+ submenu->Detach();
}
return item;