Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- index = @control.items.index_of(@control.selected_item)
- if index < 0
- index = @control.selected_item.parent.items.index_of(@control.selected_item)
- end
- if index > 0
- @control.selected_item.parent.items.remove_at(index)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement