summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-08-19 09:41:02 +0300
committerGitHub <noreply@github.com>2024-08-19 09:41:02 +0300
commitc04fae068bae2bfc4b126ee9742c7cf364959268 (patch)
tree9bb8cf7c4c80ae036613551b4ed82a9508892664 /indra/newview/llpreviewscript.cpp
parent4c61461883e6f90b1cdccf6b626ae3f289c257b1 (diff)
parentec7db659faf0420f5d3cd1f0be108c5aaeb53dd9 (diff)
Merge pull request #2334 from RyeMutt/ui-stutter-fixes
Fix various findChild calls causing frame drops and ui stutter
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index b7c929f0b5..02a4c7fb26 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -435,7 +435,7 @@ void LLLiveLSLEditor::experienceChanged()
if(mScriptEd->getAssociatedExperience() != mExperiences->getSelectedValue().asUUID())
{
mScriptEd->enableSave(getIsModifiable());
- //getChildView("Save_btn")->setEnabled(true);
+ //mSaveBtn->setEnabled(true);
mScriptEd->setAssociatedExperience(mExperiences->getSelectedValue().asUUID());
updateExperiencePanel();
}
@@ -481,6 +481,7 @@ void LLLiveLSLEditor::onToggleExperience( LLUICtrl *ui, void* userdata )
bool LLScriptEdCore::postBuild()
{
+ mLineCol = getChild<LLTextBox>("line_col");
mErrorList = getChild<LLScrollListCtrl>("lsl errors");
mFunctions = getChild<LLComboBox>("Insert...");
@@ -490,7 +491,8 @@ bool LLScriptEdCore::postBuild()
mEditor = getChild<LLScriptEditor>("Script Editor");
childSetCommitCallback("lsl errors", &LLScriptEdCore::onErrorList, this);
- childSetAction("Save_btn", boost::bind(&LLScriptEdCore::doSave,this,false));
+ mSaveBtn = getChild<LLButton>("Save_btn");
+ mSaveBtn->setCommitCallback(boost::bind(&LLScriptEdCore::doSave, this, false));
childSetAction("Edit_btn", boost::bind(&LLScriptEdCore::openInExternalEditor, this));
initMenu();
@@ -711,7 +713,7 @@ bool LLScriptEdCore::hasChanged()
void LLScriptEdCore::draw()
{
bool script_changed = hasChanged();
- getChildView("Save_btn")->setEnabled(script_changed && !mScriptRemoved);
+ mSaveBtn->setEnabled(script_changed && !mScriptRemoved);
if( mEditor->hasFocus() )
{
@@ -723,11 +725,11 @@ void LLScriptEdCore::draw()
args["[LINE]"] = llformat ("%d", line);
args["[COLUMN]"] = llformat ("%d", column);
cursor_pos = LLTrans::getString("CursorPos", args);
- getChild<LLUICtrl>("line_col")->setValue(cursor_pos);
+ mLineCol->setValue(cursor_pos);
}
else
{
- getChild<LLUICtrl>("line_col")->setValue(LLStringUtil::null);
+ mLineCol->setValue(LLStringUtil::null);
}
updateDynamicHelp();