diff options
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index eb432335a1..8ed22ebbde 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -568,7 +568,8 @@ void LLPanelPlaceInfo::displayParcelInfo(const LLUUID& region_id, void LLPanelPlaceInfo::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, - const LLVector3d& pos_global) + const LLVector3d& pos_global, + bool is_current_parcel) { if (!region || !parcel) return; @@ -799,6 +800,9 @@ void LLPanelPlaceInfo::displaySelectedParcelInfo(LLParcel* parcel, processParcelInfo(parcel_data); + // TODO: If agent is in currently within the selected parcel + // show the "You Are Here" banner. + getChild<LLAccordionCtrlTab>("sales_tab")->setVisible(for_sale); } @@ -846,14 +850,17 @@ void LLPanelPlaceInfo::toggleLandmarkEditMode(BOOL enabled) mTitle->setText(mCurrentTitle); } - mTitleEditor->setEnabled(enabled); - mNotesEditor->setReadOnly(!enabled); - mFolderCombo->setVisible(enabled); - getChild<LLTextBox>("folder_lable")->setVisible(enabled); - - // HACK: To change the text color in a text editor - // when it was enabled/disabled we set the text once again. - mNotesEditor->setText(mNotesEditor->getText()); + if (mNotesEditor->getReadOnly() == (enabled == TRUE)) + { + mTitleEditor->setEnabled(enabled); + mNotesEditor->setReadOnly(!enabled); + mFolderCombo->setVisible(enabled); + getChild<LLTextBox>("folder_lable")->setVisible(enabled); + + // HACK: To change the text color in a text editor + // when it was enabled/disabled we set the text once again. + mNotesEditor->setText(mNotesEditor->getText()); + } } const std::string& LLPanelPlaceInfo::getLandmarkTitle() const @@ -871,6 +878,11 @@ const LLUUID LLPanelPlaceInfo::getLandmarkFolder() const return mFolderCombo->getValue().asUUID(); } +BOOL LLPanelPlaceInfo::setLandmarkFolder(const LLUUID& id) +{ + return mFolderCombo->setCurrentByID(id); +} + void LLPanelPlaceInfo::createLandmark(const LLUUID& folder_id) { std::string name = mTitleEditor->getText(); @@ -913,17 +925,6 @@ void LLPanelPlaceInfo::createPick(const LLVector3d& pos_global, LLPanelPick* pic } // virtual -void LLPanelPlaceInfo::reshape(S32 width, S32 height, BOOL called_from_parent) -{ - if (mMinHeight > 0 && mScrollingPanel != NULL) - { - mScrollingPanel->reshape(mScrollingPanel->getRect().getWidth(), mMinHeight); - } - - LLView::reshape(width, height, called_from_parent); -} - -// virtual void LLPanelPlaceInfo::handleVisibilityChange (BOOL new_visibility) { LLPanel::handleVisibilityChange(new_visibility); |