diff options
| -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); | 
