Prevent loss of state and flicker during icon generation

- Issue MatterHackers/MatterControl#4828
Library folder consistently reloads losing 'Generating' thumbnail icon and causing flicker
This commit is contained in:
John Lewin 2020-08-29 13:40:34 -07:00
parent 9138f9fd0e
commit 2e15a418e9

View file

@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.Library
&& Directory.Exists(fullPath))
{
directoryWatcher = new FileSystemWatcher(fullPath);
directoryWatcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
directoryWatcher.NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.DirectoryName;
directoryWatcher.Changed += DirectoryContentsChanged;
directoryWatcher.Created += DirectoryContentsChanged;
directoryWatcher.Deleted += DirectoryContentsChanged;