Reduce library flickering

- Prevent the LibraryProviderSelector from creating new providers when it already has ones loaded, stored and referenced
 - Add WebRequest2 type to support custom post/request values
This commit is contained in:
John Lewin 2015-09-17 07:36:46 -07:00
parent a51e71891d
commit e3c6333ba1
4 changed files with 52 additions and 4 deletions

View file

@ -38,6 +38,7 @@ using MatterHackers.PolygonMesh.Processors;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
namespace MatterHackers.MatterControl.PrintLibrary.Provider
@ -180,6 +181,16 @@ namespace MatterHackers.MatterControl.PrintLibrary.Provider
public abstract void RemoveItem(int itemIndexToRemove);
// Base implmentation simply calls RemoveItem
public virtual void RemoveItems(int[] indexes)
{
// Remove items in reverse order
foreach (var i in indexes.OrderByDescending(i => i))
{
RemoveItem(i);
}
}
public abstract void RenameCollection(int collectionIndexToRename, string newName);
public abstract void RenameItem(int itemIndexToRename, string newName);