diff options
author | Dave Parks <davep@lindenlab.com> | 2024-05-07 09:47:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 09:47:37 -0500 |
commit | 155ddf23363f1d5c534c69f50505faf67e51948f (patch) | |
tree | 976912ed4fa3bc2af7b0b68201460f08614748b5 /indra/newview/llpreviewscript.cpp | |
parent | f79548ec68ebcef8f8f83705b65fd59da43c3e26 (diff) | |
parent | f9473e8afcb624cc1b101195bf15943ec372b56f (diff) |
Merge pull request #1421 from secondlife/DRTVWR-600-maint-A
Drtvwr 600 maint a
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 31 |
1 files changed, 10 insertions, 21 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 151252fb2d..4be3f6c742 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -2309,7 +2309,6 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id, mItem = new LLViewerInventoryItem(item); } - /*static*/ void LLLiveLSLEditor::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, bool isRunning) { @@ -2333,15 +2332,13 @@ void LLLiveLSLEditor::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAs preview->callbackLSLCompileFailed(response["errors"]); } } - } - // virtual void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) { LLViewerObject* object = gObjectList.findObject(mObjectUUID); - if(!object) + if (!object) { LLNotificationsUtil::add("SaveScriptFailObjectNotFound"); return; @@ -2366,7 +2363,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) } // Don't need to save if we're pristine - if(!mScriptEd->hasChanged()) + if (!mScriptEd->hasChanged()) { return; } @@ -2383,6 +2380,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) { mScriptEd->sync(); } + bool isRunning = getChild<LLCheckBoxCtrl>("running")->get(); getWindow()->incBusyCount(); mPendingUploads++; @@ -2409,14 +2407,14 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/) bool LLLiveLSLEditor::canClose() { - return (mScriptEd->canClose()); + return mScriptEd->canClose(); } void LLLiveLSLEditor::closeIfNeeded() { getWindow()->decBusyCount(); mPendingUploads--; - if (mPendingUploads <= 0 && mCloseAfterSave) + if ((mPendingUploads <= 0) && mCloseAfterSave) { closeFloater(); } @@ -2432,8 +2430,7 @@ void LLLiveLSLEditor::onLoad(void* userdata) // static void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save) { - LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata; - if(self) + if (LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata) { self->mCloseAfterSave = close_after_save; self->mScriptEd->mErrorList->setCommentText(""); @@ -2441,7 +2438,6 @@ void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save) } } - // static void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) { @@ -2453,8 +2449,7 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) LLSD floater_key; floater_key["taskid"] = object_id; floater_key["itemid"] = item_id; - LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key); - if(instance) + if (LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key)) { instance->mHaveRunningInfo = true; bool running; @@ -2469,7 +2464,6 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**) } } - void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata) { LLLiveLSLEditor* self = static_cast<LLLiveLSLEditor*>(userdata); @@ -2479,20 +2473,15 @@ void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata) bool LLLiveLSLEditor::monoChecked() const { - if(NULL != mMonoCheckbox) - { - return mMonoCheckbox->getValue()? true : false; - } - return false; + return mMonoCheckbox && mMonoCheckbox->getValue(); } void LLLiveLSLEditor::setAssociatedExperience( LLHandle<LLLiveLSLEditor> editor, const LLSD& experience ) { - LLLiveLSLEditor* scriptEd = editor.get(); - if(scriptEd) + if (LLLiveLSLEditor* scriptEd = editor.get()) { LLUUID id; - if(experience.has(LLExperienceCache::EXPERIENCE_ID)) + if (experience.has(LLExperienceCache::EXPERIENCE_ID)) { id=experience[LLExperienceCache::EXPERIENCE_ID].asUUID(); } |