From 3d00b4bb6c2d2e2eb2e4aaab27a75e2408dd2626 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 26 Jan 2022 16:31:23 +0200 Subject: SL-16698 Replace tabs with spaces which are used in the editor --- indra/newview/llpreviewnotecard.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpreviewnotecard.cpp') diff --git a/indra/newview/llpreviewnotecard.cpp b/indra/newview/llpreviewnotecard.cpp index 230def5362..3fd4f51559 100644 --- a/indra/newview/llpreviewnotecard.cpp +++ b/indra/newview/llpreviewnotecard.cpp @@ -866,7 +866,10 @@ bool LLPreviewNotecard::loadNotecardText(const std::string& filename) buffer[nread] = '\0'; fclose(file); - mEditor->setText(LLStringExplicit(buffer)); + std::string text = std::string(buffer); + LLStringUtil::replaceTabsWithSpaces(text, LLTextEditor::spacesPerTab()); + + mEditor->setText(text); delete[] buffer; return true; -- cgit v1.2.3