python console: another fix for pasting

git-svn-id: http://svn.osgeo.org/qgis/trunk@15675 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
wonder 2011-04-05 13:50:24 +00:00
parent 1b54e9dc33
commit 45d5d87d46

View File

@ -275,7 +275,7 @@ class PythonEdit(QTextEdit, code.InteractiveInterpreter):
# with multi-line text also run the commands # with multi-line text also run the commands
for line in pasteList[:-1]: for line in pasteList[:-1]:
self.insertPlainText(line) self.insertPlainText(line)
self.runCommand(unicode(line)) self.runCommand(unicode(self.currentCommand()))
# last line: only paste the text, do not run it # last line: only paste the text, do not run it
self.insertPlainText(unicode(pasteList[-1])) self.insertPlainText(unicode(pasteList[-1]))