Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.24 KB | None | 0 0
  1.             index = @control.items.index_of(@control.selected_item)
  2.             if index  < 0
  3.                 index = @control.selected_item.parent.items.index_of(@control.selected_item)
  4.             end
  5.             if index > 0
  6.                 @control.selected_item.parent.items.remove_at(index)
  7.             end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement