This makes adding materials a lot more convenient. This is done by making a new subclass of NumberedObjectCollection: NumberedDataObjectCollection. When an item is added to this (anyway, because under the hood append is always used) it is also added to problem.data_inputs. When they are deleted vice versa is true as well.
Items appended try to reflect user preference by being 1 after the last instance of this type in data_inputs. So a new material will be added after the previous final material.
This isn't perfect but users can always sort data_inputs how they please.
Fixes #465. fixes #93.
Checklist
[x] I have performed a self-review of my own code
[x] I have made corresponding changes to the documentation (if applicable)
[x] I have added tests that prove my fix is effective or that my feature works (if applicable)
Description
This makes adding materials a lot more convenient. This is done by making a new subclass of
NumberedObjectCollection
:NumberedDataObjectCollection
. When an item is added to this (anyway, because under the hood append is always used) it is also added toproblem.data_inputs
. When they are deleted vice versa is true as well.Items appended try to reflect user preference by being 1 after the last instance of this type in
data_inputs
. So a new material will be added after the previous final material.This isn't perfect but users can always sort
data_inputs
how they please.Fixes #465. fixes #93.
Checklist