diff --git a/Libraries/UniversalEditor.Essential/ObjectModels/Project/ProjectObjectModel.cs b/Libraries/UniversalEditor.Essential/ObjectModels/Project/ProjectObjectModel.cs
index 9394a695..e2d6efdd 100644
--- a/Libraries/UniversalEditor.Essential/ObjectModels/Project/ProjectObjectModel.cs
+++ b/Libraries/UniversalEditor.Essential/ObjectModels/Project/ProjectObjectModel.cs
@@ -115,5 +115,19 @@ namespace UniversalEditor.ObjectModels.Project
///
/// The relative path to the .
public string RelativeFileName { get; set; } = String.Empty;
+
+ private System.Collections.Generic.Dictionary _projectSettings = new System.Collections.Generic.Dictionary();
+ public object GetProjectSetting(Guid id, object defaultValue = null)
+ {
+ if (_projectSettings.ContainsKey(id))
+ {
+ return _projectSettings[id];
+ }
+ return defaultValue;
+ }
+ public void SetProjectSetting(Guid id, object value)
+ {
+ _projectSettings[id] = value;
+ }
}
}
diff --git a/Libraries/UniversalEditor.UserInterface/EditorApplication.cs b/Libraries/UniversalEditor.UserInterface/EditorApplication.cs
index aa82a34e..b3b9ef51 100644
--- a/Libraries/UniversalEditor.UserInterface/EditorApplication.cs
+++ b/Libraries/UniversalEditor.UserInterface/EditorApplication.cs
@@ -1428,6 +1428,13 @@ namespace UniversalEditor.UserInterface
{
if (projType.SettingsProvider != null)
{
+ for (int i = 0; i < projType.SettingsProvider.SettingsGroups.Count; i++)
+ {
+ for (int j = 0; j < projType.SettingsProvider.SettingsGroups[i].Settings.Count; j++)
+ {
+ projType.SettingsProvider.SettingsGroups[i].Settings[j].SetValue(project.GetProjectSetting(projType.SettingsProvider.SettingsGroups[i].Settings[j].ID, projType.SettingsProvider.SettingsGroups[i].Settings[j].DefaultValue));
+ }
+ }
list.Add(projType.SettingsProvider);
}
}
@@ -1444,6 +1451,19 @@ namespace UniversalEditor.UserInterface
if (dlg.ShowDialog() == DialogResult.OK)
{
// TODO: apply properties to project
+ foreach (ProjectType projType in project.ProjectTypes)
+ {
+ if (projType.SettingsProvider != null)
+ {
+ for (int i = 0; i < projType.SettingsProvider.SettingsGroups.Count; i++)
+ {
+ for (int j = 0; j < projType.SettingsProvider.SettingsGroups[i].Settings.Count; j++)
+ {
+ project.SetProjectSetting(projType.SettingsProvider.SettingsGroups[i].Settings[j].ID, projType.SettingsProvider.SettingsGroups[i].Settings[j].GetValue());
+ }
+ }
+ }
+ }
}
return;
}