aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterbuy.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llfloaterbuy.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/linden/indra/newview/llfloaterbuy.cpp b/linden/indra/newview/llfloaterbuy.cpp
index 04b56bf..2266845 100644
--- a/linden/indra/newview/llfloaterbuy.cpp
+++ b/linden/indra/newview/llfloaterbuy.cpp
@@ -63,8 +63,6 @@ LLFloaterBuy::LLFloaterBuy()
63 63
64LLFloaterBuy::~LLFloaterBuy() 64LLFloaterBuy::~LLFloaterBuy()
65{ 65{
66 gSelectMgr->deselectAll();
67
68 sInstance = NULL; 66 sInstance = NULL;
69} 67}
70 68
@@ -80,7 +78,9 @@ void LLFloaterBuy::reset()
80// static 78// static
81void LLFloaterBuy::show(const LLSaleInfo& sale_info) 79void LLFloaterBuy::show(const LLSaleInfo& sale_info)
82{ 80{
83 if (gSelectMgr->getRootObjectCount() != 1) 81 LLObjectSelectionHandle selection = gSelectMgr->getSelection();
82
83 if (selection->getRootObjectCount() != 1)
84 { 84 {
85 gViewerWindow->alertXml("BuyOneObjectOnly"); 85 gViewerWindow->alertXml("BuyOneObjectOnly");
86 return; 86 return;
@@ -97,9 +97,10 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
97 sInstance = new LLFloaterBuy(); 97 sInstance = new LLFloaterBuy();
98 } 98 }
99 99
100 sInstance->open(); 100 sInstance->open(); /*Flawfinder: ignore*/
101 sInstance->setFocus(TRUE); 101 sInstance->setFocus(TRUE);
102 sInstance->mSaleInfo = sale_info; 102 sInstance->mSaleInfo = sale_info;
103 sInstance->mObjectSelection = gSelectMgr->getEditSelection();
103 104
104 // Always center the dialog. User can change the size, 105 // Always center the dialog. User can change the size,
105 // but purchases are important and should be center screen. 106 // but purchases are important and should be center screen.
@@ -107,7 +108,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
107 // mid-session and the saved rect is off-center. 108 // mid-session and the saved rect is off-center.
108 sInstance->center(); 109 sInstance->center();
109 110
110 LLSelectNode* node = gSelectMgr->getFirstRootNode(); 111 LLSelectNode* node = selection->getFirstRootNode();
111 if (!node) return; 112 if (!node) return;
112 113
113 // Set title based on sale type 114 // Set title based on sale type
@@ -181,7 +182,7 @@ void LLFloaterBuy::show(const LLSaleInfo& sale_info)
181 // Must do this after the floater is created, because 182 // Must do this after the floater is created, because
182 // sometimes the inventory is already there and 183 // sometimes the inventory is already there and
183 // the callback is called immediately. 184 // the callback is called immediately.
184 LLViewerObject* obj = gSelectMgr->getFirstRootObject(); 185 LLViewerObject* obj = selection->getFirstRootObject();
185 sInstance->registerVOInventoryListener(obj,NULL); 186 sInstance->registerVOInventoryListener(obj,NULL);
186 sInstance->requestVOInventory(); 187 sInstance->requestVOInventory();
187} 188}