453 Commits

Author SHA1 Message Date
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
Nyall Dawson
174d5ee9e0 Ensure python script files saved in the Python console editor use
.py file extension
2021-07-01 15:40:20 +10:00
Nyall Dawson
8113aac88e Use a monospaced font in console command history list 2021-06-14 13:04:59 +10:00
Denis Rouzaud
da08c8a435
[cmake] generalize Python output directory in UseTest macro (#43191)
* [cmake] generalize Python output directory in UseTest macro

this is helpful in case we set up another python output directory (eg PySide2)

* define python output directories to the parent scope

* try with target_include_directories

* define vars on top level

* Update UsePythonTest.cmake

* some cleanup

* more cleanup

* fix uic

* fix path for all platforms

* fix var
2021-05-13 07:32:03 +02: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
Nyall Dawson
0f54df6675 [console] Prepend introductory text with '#' to avoid attempting to format it as Python code 2021-03-31 05:22:12 +10:00
Nyall Dawson
18d8a76009 Fix incorrect capitalization 2021-03-31 05:22:12 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +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
c0f09aa8e0 followup ae6ed7d: fix name of QPushButton 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
deacc51e1e [pyqgis-console] use play icon to run single command 2020-10-20 08:25:16 +10:00
Salvatore Larosa
3c0fb94880 [pyqgis-console] use asterisk to track changes in script 2020-10-20 06:59:24 +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
5c8013df61 [console] Fix exception when running scripts (followup cce7aa7)
and move responsibility for showing warning messages to QgsCodeEditor
base class, so that the same code can be used by other dialog script editors
2020-10-12 13:06:34 +10:00
Salvatore Larosa
cce7aa7315 [pyqgis-console] restore marker icon for syntax check 2020-10-12 09:49:45 +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