diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 12 |
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(); |