Fire the section changed event

This commit is contained in:
Thorsten Sommer 2022-07-12 20:50:25 +02:00
parent efb6732cd7
commit 0193c8de0a
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -196,6 +196,14 @@ public partial class SectionTree : UserControl
// If the selected node is not null, enable the remove & edit button: // If the selected node is not null, enable the remove & edit button:
this.buttonRename.Enabled = this.buttonRemove.Enabled = selectedNode is not null; this.buttonRename.Enabled = this.buttonRemove.Enabled = selectedNode is not null;
// When a section is selected, fire the event:
if (selectedNode is not null)
{
// Get the section from the database:
var section = SectionProcessor.GetSection(this.db, selectedNode.Name);
AppEvents.SectionChanged(section);
}
} }
private async void buttonRename_Click(object sender, EventArgs e) private async void buttonRename_Click(object sender, EventArgs e)