Disable selection on children to ensure Click event on widget
- MatterHackers/MCCentral#2779 New Cut/Copy/Paste/Save menu items intermittently function
This commit is contained in:
parent
dfa97b5080
commit
f3c0a9436d
4 changed files with 7 additions and 6 deletions
|
|
@ -96,6 +96,8 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
content = textWidget;
|
||||
}
|
||||
|
||||
content.Selectable = false;
|
||||
|
||||
var menuItem = new MenuItem(content, theme)
|
||||
{
|
||||
Name = name + " Menu Item",
|
||||
|
|
|
|||
|
|
@ -395,8 +395,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case Keys.Delete:
|
||||
case Keys.Back:
|
||||
scene.DeleteSelection();
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ either expressed or implied, of the FreeBSD Project.
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -607,7 +608,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
Title = "Cut".Localize(),
|
||||
Shortcut = "Ctrl+X",
|
||||
Action = async () =>
|
||||
Action = () =>
|
||||
{
|
||||
sceneContext.Scene.Cut();
|
||||
},
|
||||
|
|
@ -617,7 +618,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
Title = "Copy".Localize(),
|
||||
Shortcut = "Ctrl+C",
|
||||
Action = async () =>
|
||||
Action = () =>
|
||||
{
|
||||
sceneContext.Scene.Copy();
|
||||
},
|
||||
|
|
@ -627,7 +628,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
Title = "Paste".Localize(),
|
||||
Shortcut = "Ctrl+V",
|
||||
Action = async () =>
|
||||
Action = () =>
|
||||
{
|
||||
sceneContext.Scene.Paste();
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue