only lock after checking the other conditions. Also changed iteration
to remove menu items with a single RemoveItems() call. Axel, I hope you don't mind. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19600 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9710088cc3
commit
6e194a72e7
@ -81,9 +81,7 @@ TWindowMenu::AttachedToWindow()
|
||||
{
|
||||
SetFont(be_plain_font);
|
||||
|
||||
BMenuItem *item = NULL;
|
||||
while ((item = RemoveItem((int32)0)) != NULL)
|
||||
delete (item);
|
||||
RemoveItems(0, CountItems(), true);
|
||||
|
||||
int32 miniCount = 0;
|
||||
|
||||
@ -212,12 +210,10 @@ TWindowMenu::DetachedFromWindow()
|
||||
// in expando mode the teammenu will not call DragStop,
|
||||
// thus, it needs to be called from here
|
||||
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
||||
if (barview && barview->LockLooper()) {
|
||||
if (barview->Expando() && barview->Dragging()) {
|
||||
// We changed the show level in AttachedToWindow(). Undo it.
|
||||
Window()->Show();
|
||||
barview->DragStop();
|
||||
}
|
||||
if (barview && barview->Expando() && barview->Dragging() && barview->LockLooper()) {
|
||||
// We changed the show level in AttachedToWindow(). Undo it.
|
||||
Window()->Show();
|
||||
barview->DragStop();
|
||||
barview->UnlockLooper();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user