summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorSergei Litovchuk <slitovchuk@productengine.com>2010-02-18 19:13:14 +0200
committerSergei Litovchuk <slitovchuk@productengine.com>2010-02-18 19:13:14 +0200
commit5e26566f486611a49454cd83b0dd7f2dbad20d8b (patch)
treec3d2a25a2cb620adf1c858eeb33c5cd22f99df6d /indra/newview/lllocationinputctrl.cpp
parent9ef57a894f93f77b732460bff1fcc89b1658a452 (diff)
Fixed low bug (EXT-5212) Add "Parcel Properties" and "Coordinates" to World->Show.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp20
1 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index c66d067779..e493c4bf9c 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -358,6 +358,20 @@ LLLocationInputCtrl::LLLocationInputCtrl(const LLLocationInputCtrl::Params& p)
getTextEntry()->setRightMouseUpCallback(boost::bind(&LLLocationInputCtrl::onTextEditorRightClicked,this,_2,_3,_4));
updateWidgetlayout();
+ // Connecting signal for updating location on "Show Coordinates" setting change.
+ LLControlVariable* coordinates_control = gSavedSettings.getControl("NavBarShowCoordinates").get();
+ if (coordinates_control)
+ {
+ mCoordinatesControlConnection = coordinates_control->getSignal()->connect(boost::bind(&LLLocationInputCtrl::refreshLocation, this));
+ }
+
+ // Connecting signal for updating parcel icons on "Show Parcel Properties" setting change.
+ LLControlVariable* parcel_properties_control = gSavedSettings.getControl("NavBarShowParcelProperties").get();
+ if (parcel_properties_control)
+ {
+ mParcelPropertiesControlConnection = parcel_properties_control->getSignal()->connect(boost::bind(&LLLocationInputCtrl::refreshParcelIcons, this));
+ }
+
// - Make the "Add landmark" button updated when either current parcel gets changed
// or a landmark gets created or removed from the inventory.
// - Update the location string on parcel change.
@@ -391,6 +405,8 @@ LLLocationInputCtrl::~LLLocationInputCtrl()
LLViewerParcelMgr::getInstance()->removeObserver(mParcelChangeObserver);
delete mParcelChangeObserver;
+ mCoordinatesControlConnection.disconnect();
+ mParcelPropertiesControlConnection.disconnect();
mParcelMgrConnection.disconnect();
mLocationHistoryConnection.disconnect();
}
@@ -763,8 +779,7 @@ void LLLocationInputCtrl::refreshParcelIcons()
// Our "cursor" moving right to left
S32 x = mAddLandmarkBtn->getRect().mLeft;
- static LLUICachedControl<bool> show_properties("NavBarShowParcelProperties", false);
- if (show_properties)
+ if (gSavedSettings.getBOOL("NavBarShowParcelProperties"))
{
LLViewerParcelMgr* vpm = LLViewerParcelMgr::getInstance();
@@ -1008,7 +1023,6 @@ void LLLocationInputCtrl::onLocationContextMenuItemClicked(const LLSD& userdata)
{
gSavedSettings.setBOOL("NavBarShowParcelProperties",
!gSavedSettings.getBOOL("NavBarShowParcelProperties"));
- refreshParcelIcons();
}
else if (item == "landmark")
{