summaryrefslogtreecommitdiff
path: root/indra/newview/llpreviewscript.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
committerOz Linden <oz@lindenlab.com>2016-03-16 13:08:06 -0400
commit31f3db02919870a8e92c9452de477c1478b273e9 (patch)
tree1acf6944bf8dbe0b67bb64caee9188ad5e36d913 /indra/newview/llpreviewscript.cpp
parent0b996159cef3a4022c6a3d4691bd2e2db37b6e92 (diff)
parent9197a8652e49178c63ea208c6c4acf1ca3433659 (diff)
merge changes for DRTVWR-417
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r--indra/newview/llpreviewscript.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 1e6a23f365..9c115ee711 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1871,7 +1871,8 @@ LLLiveLSLEditor::LLLiveLSLEditor(const LLSD& key) :
mCloseAfterSave(FALSE),
mPendingUploads(0),
mIsModifiable(FALSE),
- mIsNew(false)
+ mIsNew(false),
+ mIsSaving(FALSE)
{
mFactoryMap["script ed panel"] = LLCallbackMap(LLLiveLSLEditor::createScriptEdPanel, this);
}
@@ -1912,6 +1913,8 @@ void LLLiveLSLEditor::callbackLSLCompileSucceeded(const LLUUID& task_id,
LL_DEBUGS() << "LSL Bytecode saved" << LL_ENDL;
mScriptEd->mErrorList->setCommentText(LLTrans::getString("CompileSuccessful"));
mScriptEd->mErrorList->setCommentText(LLTrans::getString("SaveComplete"));
+ getChild<LLCheckBoxCtrl>("running")->set(is_script_running);
+ mIsSaving = FALSE;
closeIfNeeded();
}
@@ -1932,6 +1935,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
mScriptEd->mErrorList->addElement(row);
}
mScriptEd->selectFirstError();
+ mIsSaving = FALSE;
closeIfNeeded();
}
@@ -2159,12 +2163,12 @@ void LLLiveLSLEditor::draw()
if(object->permAnyOwner())
{
runningCheckbox->setLabel(getString("script_running"));
- runningCheckbox->setEnabled(TRUE);
+ runningCheckbox->setEnabled(!mIsSaving);
if(object->permAnyOwner())
{
runningCheckbox->setLabel(getString("script_running"));
- runningCheckbox->setEnabled(TRUE);
+ runningCheckbox->setEnabled(!mIsSaving);
}
else
{
@@ -2297,6 +2301,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
getWindow()->incBusyCount();
mPendingUploads++;
BOOL is_running = getChild<LLCheckBoxCtrl>( "running")->get();
+ mIsSaving = TRUE;
if (!url.empty())
{
uploadAssetViaCaps(url, filename, mObjectUUID, mItemUUID, is_running, mScriptEd->getAssociatedExperience());