diff options
| author | James Cook <james@lindenlab.com> | 2009-10-22 12:15:53 -0700 |
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2009-10-22 12:15:53 -0700 |
| commit | a464d469705aeae57fcdbfafa45e2bf592a182c5 (patch) | |
| tree | b607dbb94ef928c7b85d36e36d0c82c9bb458af5 /indra/newview/llfloaterbuyland.cpp | |
| parent | f58857824e71edc39d98180e7750aee9ff1d780e (diff) | |
EXT-1651 Fix "You cannot close the Buy Land window" error message that prevents buying land more than once per login session.
Made LLFloaterBuyLandUI destroy itself on close, which cleans up pending currency transactions.
Changed LLViewerParcelMgr::deleteBuyInfo() signature because I found it confusing.
Reviewed with Richard.
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
| -rw-r--r-- | indra/newview/llfloaterbuyland.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp index 2c2a5107f5..36f0315790 100644 --- a/indra/newview/llfloaterbuyland.cpp +++ b/indra/newview/llfloaterbuyland.cpp @@ -81,6 +81,8 @@ public: LLFloaterBuyLandUI(const LLSD& key); virtual ~LLFloaterBuyLandUI(); + /*virtual*/ void onClose(bool app_quitting); + private: class SelectionObserver : public LLParcelObserver { @@ -300,11 +302,21 @@ LLFloaterBuyLandUI::LLFloaterBuyLandUI(const LLSD& key) LLFloaterBuyLandUI::~LLFloaterBuyLandUI() { LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver); - LLViewerParcelMgr::getInstance()->deleteParcelBuy(mParcelBuyInfo); + LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo); delete mTransaction; } +// virtual +void LLFloaterBuyLandUI::onClose(bool app_quitting) +{ + // This object holds onto observer, transactions, and parcel state. + // Despite being single_instance, destroy it to call destructors and clean + // everything up. + setVisible(FALSE); + destroy(); +} + void LLFloaterBuyLandUI::SelectionObserver::changed() { if (LLViewerParcelMgr::getInstance()->selectionEmpty()) @@ -756,7 +768,7 @@ void LLFloaterBuyLandUI::sendBuyLand() if (mParcelBuyInfo) { LLViewerParcelMgr::getInstance()->sendParcelBuy(mParcelBuyInfo); - LLViewerParcelMgr::getInstance()->deleteParcelBuy(mParcelBuyInfo); + LLViewerParcelMgr::getInstance()->deleteParcelBuy(&mParcelBuyInfo); mBought = true; } } |
