Skip to content

Commit

Permalink
Disable modifier keys for docs and rename actions
Browse files Browse the repository at this point in the history
Fixes #1057
  • Loading branch information
glopesdev committed Sep 26, 2022
1 parent 7c10615 commit 535f263
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Bonsai.Editor/EditorForm.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
Expand Down Expand Up @@ -2016,6 +2016,11 @@ private void replaceToolStripMenuItem_Click(object sender, EventArgs e)

private void renameSubjectToolStripMenuItem_Click(object sender, EventArgs e)
{
if (ModifierKeys != Keys.None)
{
return;
}

if (!toolboxTreeView.Focused)
{
var model = selectionModel.SelectedView;
Expand Down Expand Up @@ -2276,6 +2281,11 @@ private async Task OpenDocumentationAsync(string assemblyName, string uid)

private async void docsToolStripMenuItem_Click(object sender, EventArgs e)
{
if (ModifierKeys != Keys.None)
{
return;
}

if (toolboxTreeView.Focused || searchTextBox.Focused)
{
var typeNode = toolboxTreeView.SelectedNode;
Expand Down

0 comments on commit 535f263

Please sign in to comment.