diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-05-14 21:02:28 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-05-14 21:02:28 -0400 |
commit | 094dcc07f8c1d90ae723dbe60eddacb90a09eae8 (patch) | |
tree | e750942e5f22ed677b543bd49509c2a7cdc5ce56 /indra/newview/llfloatergotoline.cpp | |
parent | d4043d3b011c32eb503c43c551872f9c24d7344f (diff) | |
parent | 38c2a5bde985a6a8a96d912d432f8bdf7e5b60be (diff) |
Merge DRTVWR-591-maint-X to main on promotion of secondlife/viewer #705: Maintenance X
Diffstat (limited to 'indra/newview/llfloatergotoline.cpp')
-rw-r--r-- | indra/newview/llfloatergotoline.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/indra/newview/llfloatergotoline.cpp b/indra/newview/llfloatergotoline.cpp index 3b34f03532..005a7b3d4a 100644 --- a/indra/newview/llfloatergotoline.cpp +++ b/indra/newview/llfloatergotoline.cpp @@ -43,7 +43,7 @@ LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core) buildFromFile("floater_goto_line.xml"); sInstance = this; - + // find floater in which script panel is embedded LLView* viewp = (LLView*)editor_core; while(viewp) @@ -60,9 +60,9 @@ LLFloaterGotoLine::LLFloaterGotoLine(LLScriptEdCore* editor_core) BOOL LLFloaterGotoLine::postBuild() { - mGotoBox = getChild<LLLineEditor>("goto_line"); - mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this)); - mGotoBox->setCommitOnFocusLost(FALSE); + mGotoBox = getChild<LLLineEditor>("goto_line"); + mGotoBox->setCommitCallback(boost::bind(&LLFloaterGotoLine::onGotoBoxCommit, this)); + mGotoBox->setCommitOnFocusLost(FALSE); getChild<LLLineEditor>("goto_line")->setPrevalidate(LLTextValidate::validateNonNegativeS32); childSetAction("goto_btn", onBtnGoto,this); setDefaultBtn("goto_btn"); @@ -70,7 +70,7 @@ BOOL LLFloaterGotoLine::postBuild() return TRUE; } -//static +//static void LLFloaterGotoLine::show(LLScriptEdCore* editor_core) { if (sInstance && sInstance->mEditorCore && sInstance->mEditorCore != editor_core) @@ -93,7 +93,7 @@ LLFloaterGotoLine::~LLFloaterGotoLine() sInstance = NULL; } -// static +// static void LLFloaterGotoLine::onBtnGoto(void *userdata) { LLFloaterGotoLine* self = (LLFloaterGotoLine*)userdata; @@ -109,9 +109,9 @@ void LLFloaterGotoLine::handleBtnGoto() { if (mEditorCore && mEditorCore->mEditor) { - mEditorCore->mEditor->deselect(); - mEditorCore->mEditor->setCursor(row, column); - mEditorCore->mEditor->setFocus(TRUE); + mEditorCore->mEditor->deselect(); + mEditorCore->mEditor->setCursor(row, column); + mEditorCore->mEditor->setFocus(TRUE); } } } @@ -144,17 +144,17 @@ void LLFloaterGotoLine::onGotoBoxCommit() { if (mEditorCore && mEditorCore->mEditor) { - mEditorCore->mEditor->setCursor(row, column); - - S32 rownew = 0; - S32 columnnew = 0; - mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap - if (rownew == row && columnnew == column) - { - mEditorCore->mEditor->deselect(); - mEditorCore->mEditor->setFocus(TRUE); - sInstance->closeFloater(); - } //else do nothing (if the cursor-position didn't change) + mEditorCore->mEditor->setCursor(row, column); + + S32 rownew = 0; + S32 columnnew = 0; + mEditorCore->mEditor->getCurrentLineAndColumn( &rownew, &columnnew, FALSE ); // don't include wordwrap + if (rownew == row && columnnew == column) + { + mEditorCore->mEditor->deselect(); + mEditorCore->mEditor->setFocus(TRUE); + sInstance->closeFloater(); + } //else do nothing (if the cursor-position didn't change) } } } |