summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2009-09-15 23:48:14 +0000
committerJames Cook <james@lindenlab.com>2009-09-15 23:48:14 +0000
commit307de3598ff6c2f6241506645271aa6e01ede3f5 (patch)
treebf78ec74bc75bf0c1b9bbfaba7422983e4b69310
parentdd4cf261d9716b178a370e9625f02da60763ab2b (diff)
EXT-803 Parcel highlight stays lit after setting a parcel for sale and closing the About Land floater. The LLFloaterReg conversion made this floater single_instance, which means it does not destroy itself on close. We therefore need to explicitly clean up the parcel selection when the sell land floater is closed. Reviewed with Leyla.
-rw-r--r--indra/newview/llfloatersellland.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/indra/newview/llfloatersellland.cpp b/indra/newview/llfloatersellland.cpp
index a6aa01e83b..fe98c84301 100644
--- a/indra/newview/llfloatersellland.cpp
+++ b/indra/newview/llfloatersellland.cpp
@@ -58,6 +58,7 @@ class LLFloaterSellLandUI
public:
LLFloaterSellLandUI(const LLSD& key);
virtual ~LLFloaterSellLandUI();
+ void onClose();
private:
class SelectionObserver : public LLParcelObserver
@@ -131,6 +132,7 @@ LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key)
{
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
// LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_sell_land.xml");
+ mCloseSignal.connect(boost::bind(&LLFloaterSellLandUI::onClose, this));
}
LLFloaterSellLandUI::~LLFloaterSellLandUI()
@@ -138,6 +140,13 @@ LLFloaterSellLandUI::~LLFloaterSellLandUI()
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver);
}
+// Because we are single_instance, we are not destroyed on close.
+void LLFloaterSellLandUI::onClose()
+{
+ // Must release parcel selection to allow land to deselect, see EXT-803
+ mParcelSelection = NULL;
+}
+
void LLFloaterSellLandUI::SelectionObserver::changed()
{
if (LLViewerParcelMgr::getInstance()->selectionEmpty())
@@ -253,10 +262,7 @@ void LLFloaterSellLandUI::refreshUI()
if (!parcelp) return;
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image");
- if (snapshot)
- {
- snapshot->setImageAssetID(mParcelSnapshot);
- }
+ snapshot->setImageAssetID(mParcelSnapshot);
childSetText("info_parcel", parcelp->getName());
childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea));