diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterbuycontents.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/linden/indra/newview/llfloaterbuycontents.cpp b/linden/indra/newview/llfloaterbuycontents.cpp index 4f6f52e..1deb1ab 100644 --- a/linden/indra/newview/llfloaterbuycontents.cpp +++ b/linden/indra/newview/llfloaterbuycontents.cpp | |||
@@ -68,8 +68,6 @@ LLFloaterBuyContents::LLFloaterBuyContents() | |||
68 | 68 | ||
69 | LLFloaterBuyContents::~LLFloaterBuyContents() | 69 | LLFloaterBuyContents::~LLFloaterBuyContents() |
70 | { | 70 | { |
71 | gSelectMgr->deselectAll(); | ||
72 | |||
73 | sInstance = NULL; | 71 | sInstance = NULL; |
74 | } | 72 | } |
75 | 73 | ||
@@ -77,7 +75,9 @@ LLFloaterBuyContents::~LLFloaterBuyContents() | |||
77 | // static | 75 | // static |
78 | void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) | 76 | void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) |
79 | { | 77 | { |
80 | if (gSelectMgr->getRootObjectCount() != 1) | 78 | LLObjectSelectionHandle selection = gSelectMgr->getSelection(); |
79 | |||
80 | if (selection->getRootObjectCount() != 1) | ||
81 | { | 81 | { |
82 | gViewerWindow->alertXml("BuyContentsOneOnly"); | 82 | gViewerWindow->alertXml("BuyContentsOneOnly"); |
83 | return; | 83 | return; |
@@ -94,8 +94,9 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) | |||
94 | sInstance = new LLFloaterBuyContents(); | 94 | sInstance = new LLFloaterBuyContents(); |
95 | } | 95 | } |
96 | 96 | ||
97 | sInstance->open(); | 97 | sInstance->open(); /*Flawfinder: ignore*/ |
98 | sInstance->setFocus(TRUE); | 98 | sInstance->setFocus(TRUE); |
99 | sInstance->mObjectSelection = gSelectMgr->getEditSelection(); | ||
99 | 100 | ||
100 | // Always center the dialog. User can change the size, | 101 | // Always center the dialog. User can change the size, |
101 | // but purchases are important and should be center screen. | 102 | // but purchases are important and should be center screen. |
@@ -115,11 +116,11 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) | |||
115 | sInstance->mSaleInfo = sale_info; | 116 | sInstance->mSaleInfo = sale_info; |
116 | 117 | ||
117 | // Update the display | 118 | // Update the display |
118 | LLSelectNode* node = gSelectMgr->getFirstRootNode(); | 119 | LLSelectNode* node = selection->getFirstRootNode(); |
119 | if (!node) return; | 120 | if (!node) return; |
120 | if(node->mPermissions->isGroupOwned()) | 121 | if(node->mPermissions->isGroupOwned()) |
121 | { | 122 | { |
122 | char group_name[MAX_STRING]; | 123 | char group_name[MAX_STRING]; /*Flawfinder: ignore*/ |
123 | gCacheName->getGroupName(owner_id, group_name); | 124 | gCacheName->getGroupName(owner_id, group_name); |
124 | owner_name.assign(group_name); | 125 | owner_name.assign(group_name); |
125 | } | 126 | } |
@@ -131,7 +132,7 @@ void LLFloaterBuyContents::show(const LLSaleInfo& sale_info) | |||
131 | // Must do this after the floater is created, because | 132 | // Must do this after the floater is created, because |
132 | // sometimes the inventory is already there and | 133 | // sometimes the inventory is already there and |
133 | // the callback is called immediately. | 134 | // the callback is called immediately. |
134 | LLViewerObject* obj = gSelectMgr->getFirstRootObject(); | 135 | LLViewerObject* obj = selection->getFirstRootObject(); |
135 | sInstance->registerVOInventoryListener(obj,NULL); | 136 | sInstance->registerVOInventoryListener(obj,NULL); |
136 | sInstance->requestVOInventory(); | 137 | sInstance->requestVOInventory(); |
137 | } | 138 | } |