mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 11:01:56 +00:00
Fix problem when try to remove an old menu in a window.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35744 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
235cfca2db
commit
4bab57213d
2 changed files with 13 additions and 3 deletions
|
@ -69,9 +69,6 @@
|
|||
// Prevent recursion
|
||||
[window _setMenu: menu];
|
||||
|
||||
// Remove any possible old menu view
|
||||
[wv removeMenuView];
|
||||
|
||||
//NSLog(@"Adding menu %@ to window %@", menu, window);
|
||||
if (menu != nil)
|
||||
{
|
||||
|
@ -80,6 +77,13 @@
|
|||
[menuView setMenu: menu];
|
||||
[menuView setHorizontal: YES];
|
||||
[menuView setInterfaceStyle: NSWindows95InterfaceStyle];
|
||||
|
||||
/* Remove any possible old menu view.
|
||||
* We do this here, because in its previous place
|
||||
* (before if statement) doesn't work.
|
||||
*/
|
||||
[wv removeMenuView];
|
||||
|
||||
[wv addMenuView: menuView];
|
||||
[menuView sizeToFit];
|
||||
RELEASE(menuView);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue