jan_flanders

Untitled

Nov 25th, 2012
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1.     def get_selected(self):
  2.         """Get the selected row."""
  3.         selection = self.view.get_selection()
  4.         if selection == None or selection.get_selected_rows()[1] == None:
  5.             return None
  6.  
  7.         return selection.get_selected_rows()[1][0].get_indices()[0]
  8.  
  9.  
  10. #OR:
  11.  
  12.     def get_selected(self):
  13.         """Get the selected row."""
  14.         selection = self.view.get_selection()
  15.         if selection == None or len(selection.get_selected_rows()[1]) == 0:
  16.             return None
  17.  
  18.         return selection.get_selected_rows()[1][0].get_indices()[0]
Advertisement
Add Comment
Please, Sign In to add comment