git://git.onelab.eu
/
sface.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3fe0218
)
alow use of space to toggle items
author
smbaker
<smbaker@fc8clean.lan>
Tue, 13 Sep 2011 23:09:06 +0000
(16:09 -0700)
committer
smbaker
<smbaker@fc8clean.lan>
Tue, 13 Sep 2011 23:09:06 +0000
(16:09 -0700)
sface/screens/mainscreen.py
patch
|
blob
|
history
diff --git
a/sface/screens/mainscreen.py
b/sface/screens/mainscreen.py
index
52981bf
..
8cbe3d0
100644
(file)
--- a/
sface/screens/mainscreen.py
+++ b/
sface/screens/mainscreen.py
@@
-54,7
+54,14
@@
class NodeView(QTreeView):
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setToolTip("Double click on a row to change its status. Right click on a host to add a tag.")
self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setToolTip("Double click on a row to change its status. Right click on a host to add a tag.")
+ def keyPressEvent(self, event):
+ if (event.key() == Qt.Key_Space):
+ self.toggleSelection()
+
def mouseDoubleClickEvent(self, event):
def mouseDoubleClickEvent(self, event):
+ self.toggleSelection()
+
+ def toggleSelection(self):
index = self.currentIndex()
model = index.model()
status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent())
index = self.currentIndex()
model = index.model()
status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent())