From 2cc9bc8f73873b01e286e7241ec7d0f9fab8f880 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 2 Jul 2018 10:12:49 +1000 Subject: [PATCH] [processing] Fix unexpected newlines showing in python command in history dialog --- python/plugins/processing/gui/HistoryDialog.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/plugins/processing/gui/HistoryDialog.py b/python/plugins/processing/gui/HistoryDialog.py index e90602008c5..90683dead3a 100644 --- a/python/plugins/processing/gui/HistoryDialog.py +++ b/python/plugins/processing/gui/HistoryDialog.py @@ -33,7 +33,7 @@ from qgis.PyQt.QtCore import Qt, QCoreApplication from qgis.PyQt.QtWidgets import QAction, QPushButton, QDialogButtonBox, QStyle, QMessageBox, QFileDialog, QMenu, QTreeWidgetItem from qgis.PyQt.QtGui import QIcon from processing.gui import TestTools -from processing.core.ProcessingLog import ProcessingLog +from processing.core.ProcessingLog import ProcessingLog, LOG_SEPARATOR pluginPath = os.path.split(os.path.dirname(__file__))[0] @@ -125,7 +125,7 @@ class HistoryDialog(BASE, WIDGET): def changeText(self): item = self.tree.currentItem() if isinstance(item, TreeLogEntryItem): - self.text.setText(item.entry.text.replace('|', '\n')) + self.text.setText(item.entry.text.replace(LOG_SEPARATOR, '\n')) def createTest(self): item = self.tree.currentItem() @@ -150,4 +150,4 @@ class TreeLogEntryItem(QTreeWidgetItem): QTreeWidgetItem.__init__(self) self.entry = entry self.isAlg = isAlg - self.setText(0, '[' + entry.date + '] ' + entry.text.split('|')[0]) + self.setText(0, '[' + entry.date + '] ' + entry.text.split(LOG_SEPARATOR)[0])