forked from Plugin-JF-Onkostar/osc-variant
Issue #8: Add initial sorting based on form dependencies
This commit is contained in:
@@ -233,6 +233,10 @@ impl OnkostarEditor {
|
||||
.data_form
|
||||
.sort_unstable_by_key(|e| e.sorting_key());
|
||||
|
||||
self.editor
|
||||
.data_form
|
||||
.sort_unstable_by(DataForm::compare_by_requirement);
|
||||
|
||||
self.editor.data_form.iter_mut().for_each(|item| {
|
||||
item.sorted();
|
||||
});
|
||||
@@ -241,6 +245,10 @@ impl OnkostarEditor {
|
||||
.unterformular
|
||||
.sort_unstable_by_key(|e| e.sorting_key());
|
||||
|
||||
self.editor
|
||||
.unterformular
|
||||
.sort_unstable_by(Unterformular::compare_by_requirement);
|
||||
|
||||
self.editor.unterformular.iter_mut().for_each(|item| {
|
||||
item.sorted();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user