mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[processing] tiny improvements to the script editor
- add a keyboard shortcut to toggle the find panel - focus on the find text box when opening panel - find text when hitting return
This commit is contained in:
parent
7464ca686c
commit
6d067ba9e0
@ -106,6 +106,7 @@ class ScriptEditorDialog(BASE, WIDGET):
|
||||
self.actionDecreaseFontSize.triggered.connect(self.editor.zoomOut)
|
||||
self.editor.textChanged.connect(lambda: self.setHasChanged(True))
|
||||
|
||||
self.leFindText.returnPressed.connect(self.find)
|
||||
self.btnFind.clicked.connect(self.find)
|
||||
self.btnReplace.clicked.connect(self.replace)
|
||||
self.lastSearch = None
|
||||
@ -257,6 +258,8 @@ class ScriptEditorDialog(BASE, WIDGET):
|
||||
|
||||
def toggleSearchBox(self, checked):
|
||||
self.searchWidget.setVisible(checked)
|
||||
if (checked):
|
||||
self.leFindText.setFocus()
|
||||
|
||||
def _loadFile(self, filePath):
|
||||
with codecs.open(filePath, "r", encoding="utf-8") as f:
|
||||
|
@ -240,6 +240,9 @@
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>Ctrl+F</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Find && &Replace</string>
|
||||
</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user