While I couldn't reproduce bug #657 myself, this should fix it.

TTeamMenuItem::AttachedToWindow() calls BView::SetFont() which entered the debugger
if the menu was visible at the time.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2006-10-12 12:48:16 +00:00
parent 6edab6011e
commit bdfed6c06f
1 changed files with 6 additions and 1 deletions

View File

@ -441,7 +441,12 @@ TTeamMenuItem::ToggleExpandState(bool resizeWindow)
TWindowMenu *sub = (static_cast<TWindowMenu *>(Submenu()));
if (sub) {
// force the menu to update it's contents.
Submenu()->AttachedToWindow();
bool locked = sub->LockLooper();
// if locking the looper failed, the menu is just not visible
sub->AttachedToWindow();
if (locked)
sub->UnlockLooper();
if (sub->CountItems() > 1){
TExpandoMenuBar *parent = static_cast<TExpandoMenuBar *>(Menu());
int myindex = parent->IndexOf(this) + 1;