mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-25 00:05:24 -04:00
Fix indentation (which doing start up of python console very slow)
This commit is contained in:
parent
640f046c1c
commit
b696b465ab
@ -137,20 +137,20 @@ class QgsPythonConsoleBase(QsciScintilla):
|
|||||||
paperColor = QColor(self.settings.value("pythonConsole/paperBackgroundColor", QColor(self.BACKGROUND_COLOR)))
|
paperColor = QColor(self.settings.value("pythonConsole/paperBackgroundColor", QColor(self.BACKGROUND_COLOR)))
|
||||||
self.lexer.setPaper(paperColor, style)
|
self.lexer.setPaper(paperColor, style)
|
||||||
|
|
||||||
self.api = QsciAPIs(self.lexer)
|
self.api = QsciAPIs(self.lexer)
|
||||||
checkBoxAPI = self.settings.value("pythonConsole/preloadAPI", True, type=bool)
|
checkBoxAPI = self.settings.value("pythonConsole/preloadAPI", True, type=bool)
|
||||||
checkBoxPreparedAPI = self.settings.value("pythonConsole/usePreparedAPIFile", False, type=bool)
|
checkBoxPreparedAPI = self.settings.value("pythonConsole/usePreparedAPIFile", False, type=bool)
|
||||||
if checkBoxAPI:
|
if checkBoxAPI:
|
||||||
pap = os.path.join(QgsApplication.pkgDataPath(), "python", "qsci_apis", "pyqgis.pap")
|
pap = os.path.join(QgsApplication.pkgDataPath(), "python", "qsci_apis", "pyqgis.pap")
|
||||||
self.api.loadPrepared(pap)
|
self.api.loadPrepared(pap)
|
||||||
elif checkBoxPreparedAPI:
|
elif checkBoxPreparedAPI:
|
||||||
self.api.loadPrepared(self.settings.value("pythonConsole/preparedAPIFile"))
|
self.api.loadPrepared(self.settings.value("pythonConsole/preparedAPIFile"))
|
||||||
else:
|
else:
|
||||||
apiPath = self.settings.value("pythonConsole/userAPI", [])
|
apiPath = self.settings.value("pythonConsole/userAPI", [])
|
||||||
for i in range(0, len(apiPath)):
|
for i in range(0, len(apiPath)):
|
||||||
self.api.load(apiPath[i])
|
self.api.load(apiPath[i])
|
||||||
self.api.prepare()
|
self.api.prepare()
|
||||||
self.lexer.setAPIs(self.api)
|
self.lexer.setAPIs(self.api)
|
||||||
|
|
||||||
self.setLexer(self.lexer)
|
self.setLexer(self.lexer)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user