Fixed selected section is off by one

Closes #26
This commit is contained in:
Thorsten Sommer 2022-07-13 19:31:59 +02:00
parent 620bc992a8
commit 6b49b3f3e7
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108

View File

@ -192,7 +192,7 @@ public partial class SectionTree : UserControl
return; return;
// Get the currently selected section: // Get the currently selected section:
var selectedNode = this.treeView.SelectedNode; var selectedNode = e.Node;
// 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;