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:
@@ -81,9 +81,7 @@ TWindowMenu::AttachedToWindow()
|
|||||||
{
|
{
|
||||||
SetFont(be_plain_font);
|
SetFont(be_plain_font);
|
||||||
|
|
||||||
BMenuItem *item = NULL;
|
RemoveItems(0, CountItems(), true);
|
||||||
while ((item = RemoveItem((int32)0)) != NULL)
|
|
||||||
delete (item);
|
|
||||||
|
|
||||||
int32 miniCount = 0;
|
int32 miniCount = 0;
|
||||||
|
|
||||||
@@ -212,12 +210,10 @@ TWindowMenu::DetachedFromWindow()
|
|||||||
// in expando mode the teammenu will not call DragStop,
|
// in expando mode the teammenu will not call DragStop,
|
||||||
// thus, it needs to be called from here
|
// thus, it needs to be called from here
|
||||||
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
TBarView *barview = (dynamic_cast<TBarApp*>(be_app))->BarView();
|
||||||
if (barview && barview->LockLooper()) {
|
if (barview && barview->Expando() && barview->Dragging() && barview->LockLooper()) {
|
||||||
if (barview->Expando() && barview->Dragging()) {
|
// We changed the show level in AttachedToWindow(). Undo it.
|
||||||
// We changed the show level in AttachedToWindow(). Undo it.
|
Window()->Show();
|
||||||
Window()->Show();
|
barview->DragStop();
|
||||||
barview->DragStop();
|
|
||||||
}
|
|
||||||
barview->UnlockLooper();
|
barview->UnlockLooper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user