mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
[pyqgis-console] shows info messages also for temporary scripts
This commit is contained in:
parent
af0f61e699
commit
24bffbf262
@ -558,24 +558,19 @@ class Editor(QsciScintilla):
|
|||||||
'Hey, type something to run!')
|
'Hey, type something to run!')
|
||||||
msgEditorUnsaved = QCoreApplication.translate('PythonConsole',
|
msgEditorUnsaved = QCoreApplication.translate('PythonConsole',
|
||||||
'You have to save the file before running it.')
|
'You have to save the file before running it.')
|
||||||
if not autoSave:
|
if filename is None:
|
||||||
if filename is None:
|
if not self.isModified():
|
||||||
if not self.isModified():
|
self.parent.pc.callWidgetMessageBarEditor(msgEditorBlank, 0, True)
|
||||||
self.parent.pc.callWidgetMessageBarEditor(msgEditorBlank, 0, True)
|
|
||||||
return
|
|
||||||
else:
|
|
||||||
self.parent.pc.callWidgetMessageBarEditor(msgEditorUnsaved, 0, True)
|
|
||||||
return
|
|
||||||
if self.isModified():
|
|
||||||
self.parent.pc.callWidgetMessageBarEditor(msgEditorUnsaved, 0, True)
|
|
||||||
return
|
return
|
||||||
else:
|
if self.isModified() and not autoSave:
|
||||||
if self.syntaxCheck(fromContextMenu=False):
|
self.parent.pc.callWidgetMessageBarEditor(msgEditorUnsaved, 0, True)
|
||||||
self._runSubProcess(filename)
|
return
|
||||||
else:
|
if self.syntaxCheck(fromContextMenu=False):
|
||||||
if self.syntaxCheck(fromContextMenu=False):
|
if autoSave:
|
||||||
tmpFile = self.createTempFile()
|
tmpFile = self.createTempFile()
|
||||||
self._runSubProcess(tmpFile, True)
|
self._runSubProcess(tmpFile, True)
|
||||||
|
else:
|
||||||
|
self._runSubProcess(filename)
|
||||||
|
|
||||||
def runSelectedCode(self):
|
def runSelectedCode(self):
|
||||||
cmd = self.selectedText()
|
cmd = self.selectedText()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user