summaryrefslogtreecommitdiff
path: root/src/ui.py
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ui.py b/src/ui.py
index 6754f17..39c438a 100644
--- a/src/ui.py
+++ b/src/ui.py
@@ -313,6 +313,11 @@ class KPLayerList(QtGui.QWidget):
def selectedLayer(self):
return KP.map.layers[self.selectedLayerIndex()]
+ def selectLayer(self, row):
+ index = self.listView.currentIndex()
+ newIndex = index.sibling(row, 0)
+ self.listView.setCurrentIndex(newIndex)
+
@QtCore.pyqtSlot(QtCore.QModelIndex)
def handleRowChanged(self, current):
self.selectedLayerChanged.emit(KP.map.layers[current.row()])