def move_down(self, keypress=None): """Move selected entry down in the list.""" lis = self.parent.parentApp.tmpInvoice.get_entry_list() # cancel if list is < 2 if len(lis) < 2: return False # move selected item up new_index = move_list_entry(lis=lis, index=self.cursor_line, direction=-1) # update view self.update_values() self.cursor_line = new_index
def move_up(self, keypress=None): """Move selected offer up in the list.""" lis = self.parent.parentApp.tmpProject.get_offer_list() # cancel if list is < 2 if len(lis) < 2: return False # move selected item up new_index = move_list_entry(lis=lis, index=self.cursor_line, direction=1) # update view self.update_values() self.cursor_line = new_index