Skip to content

Commit c90f302

Browse files
authored
Merge pull request #319 from gwigz/gwigz/fix-profile-key
Fix first few chars of UUIDs missing in profiles (#299)
2 parents 537160a + e12645e commit c90f302

1 file changed

Lines changed: 13 additions & 2 deletions

File tree

indra/llui/lllineeditor.cpp

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,9 @@ LLLineEditor::LLLineEditor(const LLLineEditor::Params& p)
212212

213213
// clamp text padding to current editor size
214214
updateTextPadding();
215-
setCursor(mText.length());
215+
216+
// read-only fields anchor to start, editable ones to end of initial text
217+
setCursor(mReadOnly ? 0 : mText.length());
216218

217219
if (mSpellCheck)
218220
{
@@ -454,7 +456,16 @@ void LLLineEditor::setText(const LLStringExplicit &new_text, bool use_size_limit
454456
// try to preserve insertion point, but deselect text
455457
deselect();
456458
}
457-
setCursor(llmin((S32)mText.length(), getCursor()));
459+
460+
if (mReadOnly)
461+
{
462+
// display field, anchor to start so the value isn't scrolled off
463+
setCursor(0);
464+
}
465+
else
466+
{
467+
setCursor(llmin((S32)mText.length(), getCursor()));
468+
}
458469

459470
// Set current history line to end of history.
460471
if (mLineHistory.empty())

0 commit comments

Comments
 (0)