Nyall Dawson
895a68faee
Expose 'Search Selection in PyQGIS docs' action for all python code editors
2023-04-06 08:32:41 +10:00
Nyall Dawson
6612506d7b
Remove outdated code
2023-03-30 12:40:06 +10:00
Nyall Dawson
1822998bda
[feature][console] Allow Python console to be toggled between a dock
...
widget and a full main window dialog
Adds the same toggle button as we use for 3d map canvases and attribute
tables to make it super-easy to switch the Python console to a full
main window.
2023-03-30 12:40:06 +10:00
Nyall Dawson
03e1d90b39
Immediately write out the console history file BEFORE running commands
...
This prevents loss of history when a user enters a Python command
which results in a QGIS crash
2023-03-28 15:04:39 +10:00
Nyall Dawson
b9b06b057a
Don't add 'exec(Path(...))' entries to console history when running scripts
...
These just clutter the history
2023-03-28 15:04:39 +10:00
Denis Rouzaud
4e10546b4b
follow-up refctoring settings for code editor
2023-03-21 09:44:19 +10:00
Nyall Dawson
56ce8ca673
Add reset buttons to numeric controls
2023-03-20 16:06:24 +10:00
Nyall Dawson
a6b4742e97
Use settings registry for new settings
2023-03-20 16:06:24 +10:00
Nyall Dawson
1c2aead582
Remove duplicate code
2023-03-20 16:06:24 +10:00
Matthias Kuhn
e5d6ade348
Merge pull request #51912 from YoannQDQ/python-console-__file__-available--#49191
2023-03-18 14:56:20 +01:00
Yoann Quenach de Quivillic
4c74bd99c8
Populate combo box in code rather than in ui
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
d2d7c5b422
Use native levenshtein distance
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
5040a3b263
Fix flake8
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
8db1026ed2
Use pushWarning instead of pushMessage
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
53c7b8011b
Fallback to difflib if levenshtein unavailable
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
04a8436187
Conditional import
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
311c1b14d2
Fix infinite loop
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
00d279e999
Fix merge error
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
364bb96850
Change wording format->reformat
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
6523f0c58c
Keep cursor position after formatting
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
0f84e095b7
Add isort (sort imports)
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
63a48983d9
Add black formatter
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
3c97906bbf
Add formatting options
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
ef6de1ff2c
Add format code action in Python Console Editor
2023-03-17 10:52:08 +10:00
Yoann Quenach de Quivillic
1f25b41d79
Fix duplicated newline on save (windows)
2023-03-13 14:49:32 +10:00
Yoann Quenach de Quivillic
a1a43e5362
Fixes #49191 make "__file__" available to scripts
2023-03-03 15:57:24 +01:00
Yoann Quenach de Quivillic
43c415d109
Fix focus switch on close tab
2023-03-03 12:17:01 +10:00
Yoann Quenach de Quivillic
fc3847def7
Fix bug introduced by #51913 - Proxy EditorTab attributes to Editor
2023-03-03 12:17:01 +10:00
Yoann Quenach de Quivillic
9c56921cca
Clean up code and fix shortcuts
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
28146b538a
Fix Editor/EditorTab never deleted
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
7f231099f4
sort imports and cleanup dead code
2023-02-21 14:27:36 +10:00
Yoann Quenach de Quivillic
e6f2fc1288
Add autoSurround setting
2023-01-11 07:33:27 +10:00
Yoann Quenach de Quivillic
451317b783
Set autoCloseBracket default value to True
2023-01-11 07:33:27 +10:00
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
Yoann Quenach de Quivillic
1c79b4927d
[feature][console] Add toggle comment action in the python console ( #50341 )
...
Adds a toggle comment action in the Python Console and script editors
2023-01-07 09:27:08 +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
nicogodet
c7207f58f1
Remove asterisk from file name when using Save
2022-04-11 08:22:33 +02:00
nicogodet
b8b2ceed95
Remove asterisk from file name when using Save As...
2022-04-11 08:22:20 +02: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
550a1d3a52
Factories can specify a path to add their pages to the options tree
2021-07-29 15:48:53 +10:00