diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewermenu.cpp | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp index 9d06853..9bef0d7 100644 --- a/linden/indra/newview/llviewermenu.cpp +++ b/linden/indra/newview/llviewermenu.cpp | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | /** | 1 | /** |
3 | * @file llviewermenu.cpp | 2 | * @file llviewermenu.cpp |
4 | * @brief Builds menus out of items. | 3 | * @brief Builds menus out of items. |
@@ -588,11 +587,6 @@ void set_underclothes_menu_options() | |||
588 | 587 | ||
589 | void init_menus() | 588 | void init_menus() |
590 | { | 589 | { |
591 | if (gMenuHolder) | ||
592 | { | ||
593 | cleanup_menus(); | ||
594 | } | ||
595 | |||
596 | S32 top = gViewerWindow->getRootView()->getRect().getHeight(); | 590 | S32 top = gViewerWindow->getRootView()->getRect().getHeight(); |
597 | S32 width = gViewerWindow->getRootView()->getRect().getWidth(); | 591 | S32 width = gViewerWindow->getRootView()->getRect().getWidth(); |
598 | 592 | ||
@@ -1551,9 +1545,39 @@ static std::vector<LLPointer<view_listener_t> > sMenus; | |||
1551 | //----------------------------------------------------------------------------- | 1545 | //----------------------------------------------------------------------------- |
1552 | void cleanup_menus() | 1546 | void cleanup_menus() |
1553 | { | 1547 | { |
1548 | LL_DEBUGS("AFK") << "cleanup_menus start" << LL_ENDL; | ||
1549 | sMenus.clear(); | ||
1550 | |||
1554 | delete gMenuParcelObserver; | 1551 | delete gMenuParcelObserver; |
1555 | gMenuParcelObserver = NULL; | 1552 | gMenuParcelObserver = NULL; |
1556 | 1553 | ||
1554 | |||
1555 | delete gAttachPieMenu; | ||
1556 | gAttachPieMenu = NULL; | ||
1557 | |||
1558 | delete gDetachPieMenu; | ||
1559 | gDetachPieMenu = NULL; | ||
1560 | |||
1561 | delete gAttachScreenPieMenu; | ||
1562 | gAttachScreenPieMenu = NULL; | ||
1563 | |||
1564 | delete gDetachScreenPieMenu; | ||
1565 | gDetachScreenPieMenu = NULL; | ||
1566 | |||
1567 | for (int i = 0 ; i < 8 ; i++) | ||
1568 | { | ||
1569 | if (gAttachBodyPartPieMenus[i]) | ||
1570 | { | ||
1571 | delete gAttachBodyPartPieMenus[i]; | ||
1572 | gAttachBodyPartPieMenus[i] = NULL; | ||
1573 | } | ||
1574 | if (gAttachBodyPartPieMenus[i]) | ||
1575 | { | ||
1576 | delete gDetachBodyPartPieMenus[i]; | ||
1577 | gDetachBodyPartPieMenus[i] = NULL; | ||
1578 | } | ||
1579 | } | ||
1580 | |||
1557 | delete gPieSelf; | 1581 | delete gPieSelf; |
1558 | gPieSelf = NULL; | 1582 | gPieSelf = NULL; |
1559 | 1583 | ||
@@ -1581,7 +1605,6 @@ void cleanup_menus() | |||
1581 | delete gMenuHolder; | 1605 | delete gMenuHolder; |
1582 | gMenuHolder = NULL; | 1606 | gMenuHolder = NULL; |
1583 | 1607 | ||
1584 | sMenus.clear(); | ||
1585 | } | 1608 | } |
1586 | 1609 | ||
1587 | //----------------------------------------------------------------------------- | 1610 | //----------------------------------------------------------------------------- |
@@ -2764,6 +2787,7 @@ class LLAvatarEnableFreezeEject : public view_listener_t | |||
2764 | 2787 | ||
2765 | if (new_value) | 2788 | if (new_value) |
2766 | { | 2789 | { |
2790 | LL_DEBUGS("isOwnedSelf")<< " viewermenu" << LL_ENDL; | ||
2767 | new_value = region->isOwnedSelf(pos); | 2791 | new_value = region->isOwnedSelf(pos); |
2768 | if (!new_value || region->isOwnedGroup(pos)) | 2792 | if (!new_value || region->isOwnedGroup(pos)) |
2769 | { | 2793 | { |
@@ -6524,7 +6548,9 @@ class LLAttachmentEnableDrop : public view_listener_t | |||
6524 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) | 6548 | bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata) |
6525 | { | 6549 | { |
6526 | if (gDisconnected) | 6550 | if (gDisconnected) |
6551 | { | ||
6527 | return true; | 6552 | return true; |
6553 | } | ||
6528 | BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); | 6554 | BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->agentCanBuild()); |
6529 | 6555 | ||
6530 | //Add an inventory observer to only allow dropping the newly attached item | 6556 | //Add an inventory observer to only allow dropping the newly attached item |