Nyall Dawson
d00356a0fa
[console] Use a more modern approach to running script files, to
...
avoid 'unclosed file' warnings dumped whenever script files
are run through the Python console
2022-01-18 15:23:08 +10:00
Nyall Dawson
8113aac88e
Use a monospaced font in console command history list
2021-06-14 13:04:59 +10:00
Andrea Giudiceandrea
ea4131a5d7
Fix opening the console
...
when an error occurs (specifically when 3d library is not built) before the console is displayed.
2021-04-21 08:15:39 +10:00
Nyall Dawson
12905ccf4e
Gracefully handle import errors in console
...
Fixes opening the console when 3d library is not built
Fixes #41855
2021-04-04 06:40:55 +10:00
Salvatore Larosa
a65143e8bc
[pyqgis-console] select last row of history: address @uclaros comment
2020-10-24 05:49:33 +10:00
Salvatore Larosa
2748215b20
[pyqgis-console] fix spell check
2020-10-24 05:49:33 +10:00
Salvatore Larosa
77c4823b50
[pyqgis-console] set focus to run button in history dialog and renaming label to run button
2020-10-24 05:49:33 +10:00
Salvatore Larosa
6eec68ad74
[pyqgis-console] run multiple items selected from command history dialogy
2020-10-24 05:49:33 +10:00
Salvatore Larosa
7b7a909318
Merge pull request #39350 from uclaros/fix-del-console-history
...
Fix deleting python console history entries
2020-10-13 20:45:05 +02:00
uclaros
1f26bb03f4
Fix deleting python console history entries
2020-10-13 20:11:31 +03:00
Nyall Dawson
8d3e028d15
Cleanup raw margin manipulation used to hide holding controls, use proper methods
2020-10-13 14:14:53 +10:00
Nyall Dawson
1ac59415ec
Cleanup handling of margins in QgsCodeEditor and subclasses
2020-10-13 14:14:53 +10:00
Nyall Dawson
3098fa5906
Move code editor color scheme tracking to dedicated registry,
...
QgsCodeEditorColorSchemeRegistry
This cleans up the code, and makes it possible for creation of plugins
which add new code editor color schemes!
2020-10-06 17:11:34 +10:00
Nyall Dawson
ec2b21001e
Ensure autocomplete correctly works for all QgsCodeEditorPython instances
2020-10-06 03:57:50 +10:00
Nyall Dawson
8ec7f0e69c
Remove QgsPythonConsoleBase so that we have a single definitive Python editor class (QgsCodeEditorPython)
2020-10-06 03:57:50 +10:00
nirvn
f67515c674
[console] Additional tweaks to looks of console input/output area
2020-10-05 17:18:43 +07:00
Nyall Dawson
bb8cb8b6b0
Fix duplicate margins show in python console
2020-10-05 18:37:46 +10:00
Nyall Dawson
bc55102eb8
Move icon references back out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
e66a0a025b
Move more code out of QgsPythonConsoleBase
2020-10-05 18:37:46 +10:00
Nyall Dawson
d9782a12f5
Move more code to QgsCodeEditorPython base class
2020-10-05 13:24:46 +10:00
Salvatore Larosa
2cf6d11997
[pyqgis-console] revert changes for handy commands
2020-10-04 13:19:26 +10:00
Salvatore Larosa
f724793cf0
[pyqgis-console] a better attribute name
2020-10-04 13:19:26 +10:00
Salvatore Larosa
8533d9a89b
[pyqgis-console] restore the correct prompt
2020-10-04 13:19:26 +10:00
Nyall Dawson
ad946d45c8
Ensure colors in Python console match colors for Python editors
...
used elsewhere in the application
2020-10-04 05:02:57 +10:00
Matthias Kuhn
d5350c618c
Merge pull request #37602 from rduivenvoorde/console_base_class
...
Add/use simple BaseClass to Python Console classes
2020-09-12 08:53:15 +02:00
Richard Duivenvoorde
982e4f1262
Rename BaseClass to QgsPythonConsoleBase
2020-09-03 16:03:25 +02:00
Richard Duivenvoorde
354b9598ec
Move font, margin and caret code to baseclass
2020-08-27 18:26:54 +02:00
nirvn
38a7e7212a
[console] Fix error when console history file is missing
...
from the user profile directory (fixes #38142 )
2020-08-05 10:18:38 +07:00
Mathieu Pellerin
ebd4cd8c13
[python console] Match key up / down behavior to that of bash and
...
allow for a 'soft' history to be editable
This commit reverts the recent behavior change of a key up / down
press event which meant to prevent accidental loss of content of
a command being edited when pressing the up key on the second line
of a reflowed text.
This new approach has the python console input line behave like
bash, whereas a key up / down will always move to the next /
previous history item wherever the cursor is located. However until
the user hits enter, any edits to historical items or the new
line will be remembered.
This insures that an accidental move back in history doesn't
lead to unwanted code loss.
2020-07-13 08:32:09 +07:00
Richard Duivenvoorde
ab83e57cc8
Context menu 'Search selected in PyQGIS docs' in Console panes
2020-07-08 21:47:08 +02:00
Richard Duivenvoorde
a1fda50f95
Move setLexers to base
2020-07-08 21:17:27 +02:00
Richard Duivenvoorde
180a630363
Move icons to base and add some to items
2020-07-05 11:48:27 +02:00
Richard Duivenvoorde
5889f7df78
Add simple BaseClass
2020-07-04 16:36:47 +02:00
nirvn
af474eaf81
[python console] Deal with remaining vanishing prompt scenarios
2020-06-03 17:31:45 +07:00
nirvn
bbdc9068b0
[python console] Additional tweaks to new prompt
2020-06-03 14:15:09 +07:00
nirvn
2a25c1847d
[python console] Improve key up/down press for multiline command string
2020-06-03 14:15:09 +07:00
nirvn
296fc6cf89
[python console] Move the >>> prompt into the margin to fix a gazillion issues
2020-06-03 11:45:13 +07:00
Nyall Dawson
601a717174
Import 3d python library by default in console
2020-05-29 03:44:55 +10:00
Nyall Dawson
b6a7a10703
Fix some more python formatting issues, remove more flake exceptions
2020-05-11 11:41:50 +10:00
Nyall Dawson
d0c24edf7d
Import more useful libraries into console by default
2019-02-01 21:44:53 +11:00
Nyall Dawson
cce5c4e802
[console] Correctly save settings when exiting app
...
The closeEvent approach which was previously used is not reliable
on application exit, so manually force a settings save in this case too.
Avoids loss of command history when closing QGIS
Also remove the manual "Save" history action, as it's redundant
2018-12-06 05:42:47 +10:00
Salvatore Larosa
059d0e21c4
[pyqgis-console] fix link to c++ api doc
2018-07-08 12:44:57 +02:00
Nyall Dawson
398e2a17dd
[console] Fix invalid regex warning
2018-06-22 13:37:58 +10:00
Salvatore Larosa
3edc07b4c2
also versioning cookbook url
2018-05-29 11:59:54 +02:00
Salvatore Larosa
8f5bde40cf
use https for cookbook url
2018-05-29 11:52:43 +02:00
Salvatore Larosa
fc740d7140
Fixes #19001 : update url to _pyqgis and _api commands
2018-05-28 08:42:45 +02:00
nirvn
45aca2f942
fix unclosed strings not style in python console & script editor
2018-05-23 10:08:02 +07:00
nirvn
9cf6bbf424
Improve default color scheme for python console & script editor
2018-05-22 17:56:25 +07:00
nirvn
45b045d212
Fix missing color settings for python console / script editor
2018-05-22 13:31:29 +07:00
Nyall Dawson
6d87a4cf3f
[console] Fix unclosed strings don't respect the preset font size
2018-05-22 15:43:14 +10:00