Skip to content

Commit 77c4823

Browse files
slarosanyalldawson
authored andcommitted
[pyqgis-console] set focus to run button in history dialog and renaming label to run button
1 parent c0f09aa commit 77c4823

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

python/console/console_history_dlg.ui

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
<property name="text">
3232
<string>Reload</string>
3333
</property>
34+
<property name="autoDefault">
35+
<bool>false</bool>
36+
</property>
3437
</widget>
3538
</item>
3639
<item row="1" column="1">
@@ -41,6 +44,9 @@
4144
<property name="text">
4245
<string>Save</string>
4346
</property>
47+
<property name="autoDefault">
48+
<bool>false</bool>
49+
</property>
4450
</widget>
4551
</item>
4652
<item row="1" column="2">
@@ -59,9 +65,15 @@
5965
</spacer>
6066
</item>
6167
<item>
62-
<widget class="QPushButton" name="pasteHistory">
68+
<widget class="QPushButton" name="runHistoryButton">
6369
<property name="text">
64-
<string>Paste</string>
70+
<string>Run</string>
71+
</property>
72+
<property name="autoDefault">
73+
<bool>false</bool>
74+
</property>
75+
<property name="default">
76+
<bool>true</bool>
6577
</property>
6678
</widget>
6779
</item>
@@ -73,6 +85,9 @@
7385
<verstretch>0</verstretch>
7486
</sizepolicy>
7587
</property>
88+
<property name="focusPolicy">
89+
<enum>Qt::TabFocus</enum>
90+
</property>
7691
<property name="orientation">
7792
<enum>Qt::Horizontal</enum>
7893
</property>
@@ -98,7 +113,7 @@
98113
<bool>true</bool>
99114
</property>
100115
<property name="selectionMode">
101-
<enum>QAbstractItemView::SingleSelection</enum>
116+
<enum>QAbstractItemView::ExtendedSelection</enum>
102117
</property>
103118
</widget>
104119
</item>

python/console/console_sci.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,9 @@ def __init__(self, parent):
573573
self.listView.doubleClicked.connect(self._runHistory)
574574
self.reloadHistory.clicked.connect(self._reloadHistory)
575575
self.saveHistory.clicked.connect(self._saveHistory)
576-
self.pasteHistory.clicked.connect(self._pasteHistory)
576+
self.runHistoryButton.clicked.connect(self._runSelectedHistory)
577577

578-
def _pasteHistory(self):
578+
def _runSelectedHistory(self):
579579
items = self.listView.selectionModel().selectedIndexes()
580580
items.sort()
581581
for item in items:

0 commit comments

Comments
 (0)