Skip to content

Commit

Permalink
Feature: added ctrl+S shortcut to auto-save the graph
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKote committed Nov 21, 2021
1 parent c457a5b commit 0b83081
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Foreman/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,9 @@ private void AddItemButton_Click(object sender, EventArgs e)

private void MainForm_KeyDown(object sender, KeyEventArgs e)
{
Console.WriteLine(e.KeyValue);
if(e.KeyCode == Keys.S && (Control.ModifierKeys & Keys.Control) == Keys.Control)
if (savefilePath == null || !SaveGraph(savefilePath))
SaveGraphAs();
}

//---------------------------------------------------------Production Graph properties
Expand Down

0 comments on commit 0b83081

Please sign in to comment.