[DGrid] Use table.remove instead of setting to nil #918

Merged
merged 1 commit into from Apr 18, 2015

Projects

None yet

3 participants

@wyozi
Contributor
wyozi commented Apr 6, 2015

This fixes SortByMember not working after item removal, because there are gaps in the Items table.

@wyozi wyozi Use table.remove instead of setting to nil
This fixes SortByMember not working after item removal, because there are gaps in the Items table.
a704dd6
@wyozi wyozi changed the title from Use table.remove instead of setting to nil to [DGrid] Use table.remove instead of setting to nil Apr 6, 2015
@AshleighAdams
Contributor

Just for further explanation because it's not apparently obvious: table.remove also shifts all higher elements down to remove the "gap" in the table, and thus, is still continuous.

@robotboy655 robotboy655 merged commit 91304f0 into garrynewman:master Apr 18, 2015
@wyozi wyozi deleted the wyozi:patch-1 branch Apr 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment