Fixed path construction of sections

- Fixed missed loading of parents
- Made processing async
This commit is contained in:
tsommer committed 2022-07-13 20:07:06 +02:00
1 parent 2b5de0aa1e
commit 0adc95b016
2 files changed
+13 -5

No files matched your search

@@ -26,14 +26,14 @@ public partial class TextElements : UserControl
this.Disposed += (_, _) => this.db.Dispose();
// When the section is changed, update this component:
AppEvents.WhenSectionChanged += (sender, section) =>
AppEvents.WhenSectionChanged += async (sender, section) =>
{
this.currentSection = section;
this.buttonAdd.Enabled = this.currentSection is not null;
// Update the path:
if (this.currentSection is not null)
this.labelSectionPath.Text = SectionProcessor.GetSectionPath(this.db, this.currentSection.DataKey);
this.labelSectionPath.Text = await SectionProcessor.GetSectionPath(this.db, this.currentSection.DataKey);
};
}
}