From 07306401ec97ffd48e814a8b2c0910bfbd162a53 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 7 May 2026 00:10:18 +0300 Subject: #5677 Left side of Profile's Pick's location string can be cut --- indra/newview/llpanelprofilepicks.cpp | 18 ++++++++++++++++-- indra/newview/llpanelprofilepicks.h | 3 +++ 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp index c9626bf9ea..1c1b7a1cc4 100644 --- a/indra/newview/llpanelprofilepicks.cpp +++ b/indra/newview/llpanelprofilepicks.cpp @@ -622,6 +622,7 @@ bool LLPanelProfilePick::postBuild() { mPickName = getChild("pick_name"); mPickDescription = getChild("pick_desc"); + mPickLocation = getChild("pick_location"); mSaveButton = getChild("save_changes_btn"); mCreateButton = getChild("create_changes_btn"); mCancelButton = getChild("cancel_changes_btn"); @@ -646,11 +647,17 @@ bool LLPanelProfilePick::postBuild() mPickDescription->setKeystrokeCallback(boost::bind(&LLPanelProfilePick::onPickChanged, this, _1)); mPickDescription->setFocusReceivedCallback(boost::bind(&LLPanelProfilePick::onDescriptionFocusReceived, this)); - getChild("pick_location")->setEnabled(false); + mPickLocation->setEnabled(false); return true; } +void LLPanelProfilePick::reshape(S32 width, S32 height, bool called_from_parent) +{ + LLPanelProfilePropertiesProcessorTab::reshape(width, height, called_from_parent); + mPickLocation->setCursor(0); +} + void LLPanelProfilePick::onDescriptionFocusReceived() { if (!mIsEditing && getSelfProfile()) @@ -749,7 +756,14 @@ void LLPanelProfilePick::setPickLocation(const LLUUID &parcel_id, const std::str void LLPanelProfilePick::setPickLocation(const std::string& location) { - getChild("pick_location")->setValue(location); + mPickLocation->setValue(location); + // Pick location can be set with a long 'substitute' value or + // just a long value. + // If user sets cursor at the end, application of the substitute + // value can shift text from visible are to the left. When text + // gets restored or set, text position isn't, so just drop cursor + // position. + mPickLocation->setCursor(0); mPickLocationStr = location; mLastRequestTimer.reset(); } diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h index 847ac57cea..1a378b470b 100644 --- a/indra/newview/llpanelprofilepicks.h +++ b/indra/newview/llpanelprofilepicks.h @@ -112,6 +112,8 @@ public: void setAvatarId(const LLUUID& avatar_id) override; + void reshape(S32 width, S32 height, bool called_from_parent = true) override; + void setPickId(const LLUUID& id) { mPickId = id; } virtual LLUUID& getPickId() { return mPickId; } @@ -231,6 +233,7 @@ protected: LLTextureCtrl* mSnapshotCtrl; LLLineEditor* mPickName; LLTextEditor* mPickDescription; + LLLineEditor* mPickLocation; LLButton* mSetCurrentLocationButton; LLButton* mSaveButton; LLButton* mCreateButton; -- cgit v1.3