summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-12-21 11:37:31 +0200
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-12-21 11:37:31 +0200
commit5099d01b74cfdd4ba192844b9fb7c5d19c454a54 (patch)
treee4f8a59554112c5ad24175b2682fd85189fb1dbd /indra/newview
parent405bae78cdb3c875a588aeb554320c345075a2fd (diff)
MAINT-1017 FIXED Disable checkbox during saving process to avoid glitch.
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llpreviewscript.cpp11
-rwxr-xr-xindra/newview/llpreviewscript.h2
2 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 67832c5994..33847b7885 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -1961,7 +1961,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);
}
@@ -2002,6 +2003,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();
}
@@ -2022,6 +2025,7 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors)
mScriptEd->mErrorList->addElement(row);
}
mScriptEd->selectFirstError();
+ mIsSaving = FALSE;
closeIfNeeded();
}
@@ -2249,12 +2253,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
{
@@ -2387,6 +2391,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());
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 5f65be7383..d403214c22 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -315,6 +315,8 @@ private:
// need to save both text and script, so need to decide when done
S32 mPendingUploads;
+ BOOL mIsSaving;
+
BOOL getIsModifiable() const { return mIsModifiable; } // Evaluated on load assert
LLCheckBoxCtrl* mMonoCheckbox;