Fix icons and improve profile imports

- Invert Camera image
 - Set first imported profile as active
 - Import profiles from db if missing
 - Edit presets button should do nothing on '- default -'
This commit is contained in:
John Lewin 2016-05-11 21:27:30 -07:00
parent aee22882e6
commit d292e64ede
4 changed files with 30 additions and 11 deletions

View file

@ -91,7 +91,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
if (true)
{
ProfileData = new ProfileData();
if (!File.Exists(profilesDBPath))
{
// Import class profiles from the db into local json files
DataStorage.ClassicDB.ClassicSqlitePrinterProfiles.ImportPrinters(ProfileData, profilesPath);
File.WriteAllText(profilesDBPath, JsonConvert.SerializeObject(ProfileData, Formatting.Indented));
// TODO: Upload new profiles to webservice
}
foreach(string filePath in Directory.GetFiles(profilesPath, "*.json"))
{
string fileName = Path.GetFileName(filePath);