Skip to content
This repository has been archived by the owner on Mar 29, 2020. It is now read-only.

Commit

Permalink
Allow mappings to be deleted with F5 or DEL.
Browse files Browse the repository at this point in the history
  • Loading branch information
Idhrendur committed Feb 23, 2016
1 parent 4e90abe commit 8f10f6a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ProvinceMapper/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,14 @@ private void Form1_KeyDown(object sender, KeyEventArgs e)
else
CreateNewMapping(false, lbMappingsDict[mappingsTabs.SelectedTab.Text].Items.Count - 2);
}
else if ((e.KeyCode == Keys.F5) || (e.KeyCode == Keys.Delete))
{
if (lbMappingsDict[mappingsTabs.SelectedTab.Text].Items.Count >= 0)
{
Program.mappings.mappings[mappingsTabs.SelectedTab.Text].Remove(lbMappingsDict[mappingsTabs.SelectedTab.Text].SelectedItem as Mapping);
lbMappingsDict[mappingsTabs.SelectedTab.Text].Items.Remove(lbMappingsDict[mappingsTabs.SelectedTab.Text].SelectedItem);
}
}
else if (e.Control)
{
if (e.KeyCode == Keys.Oemplus)
Expand Down

0 comments on commit 8f10f6a

Please sign in to comment.