Add to Library does old behavior of adding to the sqlite library.
This commit is contained in:
parent
e27a3ec16c
commit
a7e1e1a14f
1 changed files with 6 additions and 1 deletions
|
|
@ -121,7 +121,12 @@ namespace MatterHackers.MatterControl.PrintLibrary
|
|||
indexToInsert = PrintItems.Count;
|
||||
}
|
||||
PrintItems.Insert(indexToInsert, item);
|
||||
OnItemAdded(new IndexArgs(indexToInsert));
|
||||
// Check if the collection we are adding to is the the currently visible collection.
|
||||
List<ProviderLocatorNode> currentDisplayedCollection = LibraryProvider.Instance.GetProviderLocator();
|
||||
if (currentDisplayedCollection.Count > 0 && currentDisplayedCollection[1].Key == LibraryProviderSQLite.StaticProviderKey)
|
||||
{
|
||||
OnItemAdded(new IndexArgs(indexToInsert));
|
||||
}
|
||||
item.PrintItem.PrintItemCollectionID = LibraryCollection.Id;
|
||||
item.PrintItem.Commit();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue