Yoann Quenach de Quivillic
e992797f8b
Restore autoCloseBracket settings and factorize autoInsertImport
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
f98266b768
Get rid of the old autoCloseBracket setting
2023-01-11 07:33:27 +10:00
Nyall Dawson
941adaa4a8
Some more code to base class
2022-10-24 16:46:11 +10:00
Nyall Dawson
955c72388d
Factor out interpreter
2022-10-24 16:46:11 +10:00
Nyall Dawson
73b75af8c3
Move prompt handling to QgsCodeEditor
2022-10-24 16:46:11 +10:00
Nyall Dawson
374dcbab53
Minor cleanups
2022-10-24 16:46:11 +10:00
Nyall Dawson
b7ffb0cb6f
Move responsibility for storing history of run commands to base class
2022-10-24 16:46:11 +10:00
Nyall Dawson
3786cd178d
Move python console history handling to base QgsCodeEditor class
...
So that other non-python-console code editors can utilise this too
2022-10-24 16:46:11 +10:00
Nyall Dawson
34227bdf1c
Fix broken logic in clearing python console history
...
- clearing session was also clearing the file history
- clearing file history was doing nothing
2022-10-12 08:22:34 +10:00
Nyall Dawson
ed54489a09
Move some useful python console methods to base class
2022-10-10 14:01:24 +10:00
Hannes
cb914be6f3
Fix PEP8 E266 for second level heading comment
2022-09-04 06:05:10 +10:00
Hannes
ccb46e79d8
Python Console: Don't throw exception if compiled without 3D
...
Fixes #49987
2022-09-04 06:05:10 +10:00
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