We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
qgis
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 0d53fc7 commit 91f7365Copy full SHA for 91f7365
python/console.py
@@ -272,9 +272,12 @@ def insertFromMimeData(self, source):
272
if source.hasText():
273
pasteList = QStringList()
274
pasteList = source.text().split("\n")
275
- for line in pasteList:
276
- self.insertPlainText(line)
277
- self.runCommand(unicode(line))
+ # with multi-line text also run the commands
+ for line in pasteList[:-1]:
+ self.insertPlainText(line)
278
+ self.runCommand(unicode(line))
279
+ # last line: only paste the text, do not run it
280
+ self.insertPlainText(unicode(pasteList[-1]))
281
282
def entered(self):
283
self.cursor.movePosition(QTextCursor.End, QTextCursor.MoveAnchor)
0 commit comments