Skip to content
Snippets Groups Projects
Commit 307de359 authored by James Cook's avatar James Cook
Browse files

EXT-803 Parcel highlight stays lit after setting a parcel for sale and closing...

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.
parent dd4cf261
No related branches found
No related tags found
No related merge requests found
...@@ -58,6 +58,7 @@ class LLFloaterSellLandUI ...@@ -58,6 +58,7 @@ class LLFloaterSellLandUI
public: public:
LLFloaterSellLandUI(const LLSD& key); LLFloaterSellLandUI(const LLSD& key);
virtual ~LLFloaterSellLandUI(); virtual ~LLFloaterSellLandUI();
void onClose();
private: private:
class SelectionObserver : public LLParcelObserver class SelectionObserver : public LLParcelObserver
...@@ -131,6 +132,7 @@ LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key) ...@@ -131,6 +132,7 @@ LLFloaterSellLandUI::LLFloaterSellLandUI(const LLSD& key)
{ {
LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver); LLViewerParcelMgr::getInstance()->addObserver(&mParcelSelectionObserver);
// LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_sell_land.xml"); // LLUICtrlFactory::getInstance()->buildFloater(sInstance, "floater_sell_land.xml");
mCloseSignal.connect(boost::bind(&LLFloaterSellLandUI::onClose, this));
} }
LLFloaterSellLandUI::~LLFloaterSellLandUI() LLFloaterSellLandUI::~LLFloaterSellLandUI()
...@@ -138,6 +140,13 @@ LLFloaterSellLandUI::~LLFloaterSellLandUI() ...@@ -138,6 +140,13 @@ LLFloaterSellLandUI::~LLFloaterSellLandUI()
LLViewerParcelMgr::getInstance()->removeObserver(&mParcelSelectionObserver); 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() void LLFloaterSellLandUI::SelectionObserver::changed()
{ {
if (LLViewerParcelMgr::getInstance()->selectionEmpty()) if (LLViewerParcelMgr::getInstance()->selectionEmpty())
...@@ -253,10 +262,7 @@ void LLFloaterSellLandUI::refreshUI() ...@@ -253,10 +262,7 @@ void LLFloaterSellLandUI::refreshUI()
if (!parcelp) return; if (!parcelp) return;
LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image"); LLTextureCtrl* snapshot = getChild<LLTextureCtrl>("info_image");
if (snapshot) snapshot->setImageAssetID(mParcelSnapshot);
{
snapshot->setImageAssetID(mParcelSnapshot);
}
childSetText("info_parcel", parcelp->getName()); childSetText("info_parcel", parcelp->getName());
childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea)); childSetTextArg("info_size", "[AREA]", llformat("%d", mParcelActualArea));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment