Skip to content

Commit

Permalink
Fixed Enable/Disable Entity Editor
Browse files Browse the repository at this point in the history
  • Loading branch information
circles-arrows committed Jul 31, 2019
1 parent d65d98d commit 4bc82f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Blueprint41.Modeller/Controls/GraphEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,8 @@ protected virtual ContextMenuStrip BuildContextMenu(GeometryPoint point)
{
mi = new ToolStripMenuItem() { Text = "Insert " + nte.Name };
mi.Click += InsertNode_Click;
mi.Enabled = !this.Viewer.InsertingEdge;

cm.Items.Add(mi);
}

Expand Down
5 changes: 5 additions & 0 deletions Blueprint41.Modeller/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ private void GraphEditor_EdgeModeClicked(object sender, EventArgs e)
graphEditor.PanButtonPressedOnMenu = false;

SetCheckedModeMenuControls();
EnableDisableEntityEditor();
}

void GraphEditor_EdgeRemoved(object sender, EdgeEventArgs e)
Expand Down Expand Up @@ -839,7 +840,11 @@ private void TsbEdgeInsertion_Click(object sender, EventArgs e)
graphEditor.PanButtonPressedOnMenu = false;

SetCheckedModeMenuControls();
EnableDisableEntityEditor();
}

private void EnableDisableEntityEditor()
{
if (graphEditor.Viewer.InsertingEdge)
CloseNodeEditor();
else
Expand Down

0 comments on commit 4bc82f3

Please sign in to comment.