fixed drag drop to 3d view
This commit is contained in:
parent
35db9e6867
commit
f9dbf74fcd
4 changed files with 14 additions and 3 deletions
|
|
@ -74,4 +74,15 @@ namespace MatterHackers.MatterControl.Library
|
||||||
return Task.FromResult<StreamAndLength>(null);
|
return Task.FromResult<StreamAndLength>(null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// This class is specifically used for drag drop of scene replacement files
|
||||||
|
/// </summary>
|
||||||
|
public class SceneReplacementFileItem : FileSystemFileItem
|
||||||
|
{
|
||||||
|
public SceneReplacementFileItem(string filePath)
|
||||||
|
: base(filePath)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1233,7 +1233,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
|
|
||||||
if ((firstItem is ILibraryAssetStream contentStream
|
if ((firstItem is ILibraryAssetStream contentStream
|
||||||
&& contentStream.ContentType == "gcode")
|
&& contentStream.ContentType == "gcode")
|
||||||
|| firstItem is FileSystemFileItem)
|
|| firstItem is SceneReplacementFileItem)
|
||||||
{
|
{
|
||||||
DragDropObject = null;
|
DragDropObject = null;
|
||||||
this.SceneReplacement = firstItem as ILibraryAssetStream;
|
this.SceneReplacement = firstItem as ILibraryAssetStream;
|
||||||
|
|
|
||||||
|
|
@ -610,7 +610,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
||||||
int maxItemWidth = 0;
|
int maxItemWidth = 0;
|
||||||
|
|
||||||
var recentFiles = new DirectoryInfo(ApplicationDataStorage.Instance.PlatingDirectory).GetFiles("*.mcx").OrderByDescending(f => f.LastWriteTime);
|
var recentFiles = new DirectoryInfo(ApplicationDataStorage.Instance.PlatingDirectory).GetFiles("*.mcx").OrderByDescending(f => f.LastWriteTime);
|
||||||
foreach (var item in recentFiles.Where(f => f.Length > 215).Select(f => new FileSystemFileItem(f.FullName)).Take(12))
|
foreach (var item in recentFiles.Where(f => f.Length > 215).Select(f => new SceneReplacementFileItem(f.FullName)).Take(12))
|
||||||
{
|
{
|
||||||
var imageBuffer = new ImageBuffer(thumbWidth, thumbWidth);
|
var imageBuffer = new ImageBuffer(thumbWidth, thumbWidth);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit bb22b896576d4871774b966af45546b3509edf9a
|
Subproject commit ccb6fd61762931e024e0517e287925560c835c9e
|
||||||
Loading…
Add table
Add a link
Reference in a new issue