diff options
| author | Chuck Linden <chuck@lindenlab.com> | 2010-02-19 14:32:55 -0500 |
|---|---|---|
| committer | Chuck Linden <chuck@lindenlab.com> | 2010-02-19 14:32:55 -0500 |
| commit | 9aee0cfa716736659af777c9fccd60b8618dc9d4 (patch) | |
| tree | bd6f329c88fc27fb697f6660d9eb51bcb14b9585 /indra/newview/lllocationinputctrl.cpp | |
| parent | cd9a2a6a4ab8d1d989110908a3702ba34d1f6168 (diff) | |
| parent | 65f8b95ae8e93c3b946e43eea89bcb631723ca6c (diff) | |
Automated merge with file:///Users/chuck/Documents/hg/viewer-hotfix
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
| -rw-r--r-- | indra/newview/lllocationinputctrl.cpp | 20 |
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") { |
