From 93a546ab4b3b52f07babdac9185667d78fe7f264 Mon Sep 17 00:00:00 2001 From: baldurk Date: Mon, 12 Aug 2019 17:03:32 +0100 Subject: [PATCH] Remove extra dos newlines from scintilla editor. Closes #1493 --- qrenderdoc/Windows/PythonShell.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/Windows/PythonShell.cpp b/qrenderdoc/Windows/PythonShell.cpp index de50874d3..49903967f 100644 --- a/qrenderdoc/Windows/PythonShell.cpp +++ b/qrenderdoc/Windows/PythonShell.cpp @@ -669,7 +669,9 @@ void PythonShell::on_saveScript_clicked() QFile f(filename); if(f.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text)) { - f.write(scriptEditor->getText(scriptEditor->textLength() + 1)); + QString text = QString::fromUtf8(scriptEditor->getText(scriptEditor->textLength() + 1)); + text.remove(QLatin1Char('\r')); + f.write(text.toUtf8()); } else {