diff options
author | Ima Mechanique <none@none> | 2011-12-09 09:51:25 +0000 |
---|---|---|
committer | Ima Mechanique <none@none> | 2011-12-09 09:51:25 +0000 |
commit | 04d5ba4ab982eed493502dca228134191acb78da (patch) | |
tree | 1b00821235d0dbc30295e3c5dca0cee19422a5a7 /indra/newview/llpreviewscript.cpp | |
parent | 468543c944b073af41a3cf7f6dfe73f097c2eb2d (diff) |
General cleanup of new code (removing commented lines, experimetal stuff), adding some comments per RB feedback.
Diffstat (limited to 'indra/newview/llpreviewscript.cpp')
-rw-r--r-- | indra/newview/llpreviewscript.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 62603a2e07..cab30b1295 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1108,19 +1108,12 @@ BOOL LLScriptEdCore::handleKeyHere(KEY key, MASK mask) void LLScriptEdCore::onBtnLoadFromFile( void* data ) { LLScriptEdCore* self = (LLScriptEdCore*) data; -/* - if( self->isDirty()) - { - llwarns << "Script has unsaved changes, loading from disc aborted." << llendl; - LLStringBase<char>::format_map_t args; - args["[REASON]"] = std::string("Existing script has unsaved changes. You must save this script before loading from disc."); - gViewerWindow->alertXml("LoadDiskScriptFailReason", args); - return; - } -*/ + + // TODO Maybe add a dialogue warning here if the current file has unsaved changes. LLFilePicker& file_picker = LLFilePicker::instance(); if( !file_picker.getOpenFile( LLFilePicker::FFLOAD_SCRIPT ) ) { + //File picking cancelled by user, so nothing to do. return; } @@ -1147,7 +1140,6 @@ void LLScriptEdCore::onBtnLoadFromFile( void* data ) { self->mEditor->selectAll(); LLWString script(utf8str_to_wstring(text)); - LLWStringUtil::replaceTabsWithSpaces(script, self->mEditor->spacesPerTab()); self->mEditor->insertText(script); } } @@ -1164,6 +1156,7 @@ void LLScriptEdCore::onBtnSaveToFile( void* userdata ) LLFilePicker& file_picker = LLFilePicker::instance(); if( !file_picker.getSaveFile( LLFilePicker::FFSAVE_SCRIPT ) ) { + //File picking cancelled by user, so nothing to do. return; } |