diff options
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 9e209f3914..8364b7d964 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -241,6 +241,7 @@ LLFloaterScriptSearch::LLFloaterScriptSearch(LLScriptEdCore* editor_core) mEditorCore(editor_core) { buildFromFile("floater_script_search.xml"); + setCanMinimize(false); sInstance = this; @@ -2303,6 +2304,23 @@ void LLLiveLSLEditor::callbackLSLCompileFailed(const LLSD& compile_errors) closeIfNeeded(); } +void LLLiveLSLEditor::openInExternalEditorWhenReady() +{ + if (!mScriptEd) + { + return; + } + if (mAssetStatus == PREVIEW_ASSET_LOADED) + { + if (getIsModifiable()) + { + mScriptEd->openInExternalEditor(); + } + return; + } + mOpenExternalWhenLoaded = true; +} + void LLLiveLSLEditor::loadAsset() { //LL_INFOS() << "LLLiveLSLEditor::loadAsset()" << LL_ENDL; @@ -2414,6 +2432,11 @@ void LLLiveLSLEditor::onLoadComplete(const LLUUID& asset_id, instance->mScriptEd->setEnableEditing(true); instance->mAssetStatus = PREVIEW_ASSET_LOADED; instance->mScriptEd->setAssetID(asset_id); + if (instance->mOpenExternalWhenLoaded && instance->getIsModifiable()) + { + instance->mOpenExternalWhenLoaded = false; + instance->mScriptEd->openInExternalEditor(); + } } else { @@ -2430,6 +2453,7 @@ void LLLiveLSLEditor::onLoadComplete(const LLUUID& asset_id, { LLNotificationsUtil::add("UnableToLoadScript"); } + instance->mOpenExternalWhenLoaded = false; instance->mAssetStatus = PREVIEW_ASSET_ERROR; } } |
