Ensure drag-drop GCode is disallowed on part tabs
- Issue MatterHackers/MCCentral#3318 Drag-drop GCode to part tab should not be allowed
This commit is contained in:
parent
474823feba
commit
50ec91ea2f
1 changed files with 6 additions and 1 deletions
|
|
@ -805,7 +805,12 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
// File system Drop validation
|
// File system Drop validation
|
||||||
mouseEvent.AcceptDrop = this.AllowDragDrop()
|
mouseEvent.AcceptDrop = this.AllowDragDrop()
|
||||||
&& mouseEvent.DragFiles?.Count > 0
|
&& mouseEvent.DragFiles?.Count > 0
|
||||||
&& mouseEvent.DragFiles.TrueForAll(filePath => ApplicationController.Instance.IsLoadableFile(filePath));
|
&& mouseEvent.DragFiles.TrueForAll(filePath =>
|
||||||
|
{
|
||||||
|
return ApplicationController.Instance.IsLoadableFile(filePath)
|
||||||
|
// Disallow GCode drop in part view
|
||||||
|
&& (this.Printer != null || string.Equals(System.IO.Path.GetExtension(filePath), ".gcode", StringComparison.OrdinalIgnoreCase));
|
||||||
|
});
|
||||||
|
|
||||||
// View3DWidgets Filesystem DropDrop handler
|
// View3DWidgets Filesystem DropDrop handler
|
||||||
if (mouseEvent.AcceptDrop
|
if (mouseEvent.AcceptDrop
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue