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:
c27cbd1
)
handle clicking in the main window when no rspec downloaded
author
smbaker
<smbaker@fc8clean.lan>
Tue, 24 Jan 2012 00:25:41 +0000
(16:25 -0800)
committer
smbaker
<smbaker@fc8clean.lan>
Tue, 24 Jan 2012 00:25:41 +0000
(16:25 -0800)
sface/screens/mainscreen.py
patch
|
blob
|
history
diff --git
a/sface/screens/mainscreen.py
b/sface/screens/mainscreen.py
index
988d608
..
df110c6
100644
(file)
--- a/
sface/screens/mainscreen.py
+++ b/
sface/screens/mainscreen.py
@@
-75,6
+75,11
@@
class NodeView(QTreeView):
def toggleSelection(self):
index = self.currentIndex()
model = index.model()
def toggleSelection(self):
index = self.currentIndex()
model = index.model()
+
+ if (model == None):
+ # probably no rspec downloaded yet
+ return
+
status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent())
status_data = status_index.data().toString()
node_index = model.index(index.row(), NAME_COLUMN, index.parent())
status_index = model.index(index.row(), MEMBERSHIP_STATUS_COLUMN, index.parent())
status_data = status_index.data().toString()
node_index = model.index(index.row(), NAME_COLUMN, index.parent())
@@
-125,6
+130,11
@@
class NodeView(QTreeView):
# Right click
index = self.currentIndex()
model = index.model()
# Right click
index = self.currentIndex()
model = index.model()
+
+ if (model == None):
+ # probably no rspec downloaded yet
+ return
+
status_index = model.index(index.row(), 1, index.parent())
status_data = status_index.data().toString()
node_index = model.index(index.row(), 0, index.parent())
status_index = model.index(index.row(), 1, index.parent())
status_data = status_index.data().toString()
node_index = model.index(index.row(), 0, index.parent())