Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[pyqgis-console] select last row of history: address @uclaros comment
  • Loading branch information
slarosa authored and nyalldawson committed Oct 23, 2020
1 parent 2748215 commit a65143e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/console/console_sci.py
Expand Up @@ -590,6 +590,7 @@ def _saveHistory(self):

def _reloadHistory(self):
self.model.clear()
item = None
for i in self.parent.history:
item = QStandardItem(i)
if sys.platform.startswith('win'):
Expand All @@ -598,6 +599,8 @@ def _reloadHistory(self):

self.listView.setModel(self.model)
self.listView.scrollToBottom()
if item:
self.listView.setCurrentIndex(self.model.indexFromItem(item))

def _deleteItem(self):
itemsSelected = self.listView.selectionModel().selectedIndexes()
Expand Down

0 comments on commit a65143e

Please sign in to comment.