Fire the section changed event
This commit is contained in:
1 file changed
+8
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user