Fixed a bug the Profile Manager where the user would get a 'Duplicate Key Error' trying to update a folder group.
This commit is contained in:
Binary file not shown.
@@ -21,7 +21,6 @@ namespace DataOrganizer
|
|||||||
private List<DB.Namingconvention> NamingConventions { get; }
|
private List<DB.Namingconvention> NamingConventions { get; }
|
||||||
private Dictionary<string, DB.Profile> Profiles { get; } = new Dictionary<string, DB.Profile>();
|
private Dictionary<string, DB.Profile> Profiles { get; } = new Dictionary<string, DB.Profile>();
|
||||||
private Dictionary<string, DB.FolderGroup> FolderGroups { get; } = new Dictionary<string, DB.FolderGroup>();
|
private Dictionary<string, DB.FolderGroup> FolderGroups { get; } = new Dictionary<string, DB.FolderGroup>();
|
||||||
private DB.FolderGroup ActiveFolderGroup { get; set; }
|
|
||||||
|
|
||||||
public ProfileManager()
|
public ProfileManager()
|
||||||
{
|
{
|
||||||
@@ -201,13 +200,6 @@ namespace DataOrganizer
|
|||||||
|
|
||||||
private void InsertGroupName_Click(object sender, EventArgs e)
|
private void InsertGroupName_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (FolderGroups.ContainsKey(FolderNameTextBox.Text))
|
|
||||||
{
|
|
||||||
MessageBox.Show($"'{FolderNameTextBox.Text}' already exists as a Folder Group. Duplicate names are not allowed.", "Duplication Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
||||||
FolderNameTextBox.Focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
FolderGroupPathTextBox.Text = FolderGroupPathTextBox.Text.TrimEnd(new char[] { '\\' });
|
FolderGroupPathTextBox.Text = FolderGroupPathTextBox.Text.TrimEnd(new char[] { '\\' });
|
||||||
|
|
||||||
if(GetSelectedFolderGroup(out DB.FolderGroup folderGroup))
|
if(GetSelectedFolderGroup(out DB.FolderGroup folderGroup))
|
||||||
|
|||||||
Reference in New Issue
Block a user