Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_selected(self):
- """Get the selected row."""
- selection = self.view.get_selection()
- if selection == None or selection.get_selected_rows()[1] == None:
- return None
- return selection.get_selected_rows()[1][0].get_indices()[0]
- #OR:
- def get_selected(self):
- """Get the selected row."""
- selection = self.view.get_selection()
- if selection == None or len(selection.get_selected_rows()[1]) == 0:
- return None
- return selection.get_selected_rows()[1][0].get_indices()[0]
Advertisement
Add Comment
Please, Sign In to add comment