diff options
author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-03-25 11:37:19 +0200 |
---|---|---|
committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2014-03-25 11:37:19 +0200 |
commit | bb0515db318ee4e528da75160e982b38dd9b4b5f (patch) | |
tree | cc3085f93ac1bf951c8cbe132379dfea8a251558 /indra | |
parent | 7aa2aeca93a4ac881c48e59bfc59a9ae9849ac62 (diff) |
MAINT-3852 FIXED Use script name in "Save as" dialog.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llpreviewscript.cpp | 3 | ||||
-rwxr-xr-x | indra/newview/llpreviewscript.h | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 18bbf110f7..7ea62bb332 100755 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1191,7 +1191,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata ) if( self->mSaveCallback ) { LLFilePicker& file_picker = LLFilePicker::instance(); - if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) ) + if( file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT, self->mScriptName ) ) { std::string filename = file_picker.getFirstFile(); std::string scriptText=self->mEditor->getText(); @@ -1978,6 +1978,7 @@ void LLLiveLSLEditor::loadScriptText(LLVFS *vfs, const LLUUID &uuid, LLAssetType mScriptEd->setScriptText(LLStringExplicit(&buffer[0]), TRUE); mScriptEd->mEditor->makePristine(); + mScriptEd->setScriptName(getItem()->getName()); } diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h index 9fb0a4fb63..97187e055a 100755 --- a/indra/newview/llpreviewscript.h +++ b/indra/newview/llpreviewscript.h @@ -110,6 +110,8 @@ public: virtual bool hasAccelerators() const { return true; } + void setScriptName(const std::string& name){mScriptName = name;}; + private: void onBtnHelp(); void onBtnDynamicHelp(); @@ -132,6 +134,7 @@ protected: private: std::string mSampleText; + std::string mScriptName; LLTextEditor* mEditor; void (*mLoadCallback)(void* userdata); void (*mSaveCallback)(void* userdata, BOOL close_after_save); |