Browse Source

added manually pr # 5 (Fixed bug #674 #5)

pull/796/head
Xelwon 8 years ago
parent
commit
44bf7582f3
  1. 6
      src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/FolderNodeCommands.cs

6
src/Main/Base/Project/Src/Gui/Pads/ProjectBrowser/Commands/FolderNodeCommands.cs

@ -1,4 +1,4 @@
// Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team // Copyright (c) 2014 AlphaSierraPapa for the SharpDevelop Team
// //
// Permission is hereby granted, free of charge, to any person obtaining a copy of this // Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software // software and associated documentation files (the "Software"), to deal in the Software
@ -80,6 +80,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
if (!FileUtility.IsEqualFileName(directoryName, copiedFileName)) { if (!FileUtility.IsEqualFileName(directoryName, copiedFileName)) {
if (includeInProject && ProjectService.OpenSolution != null) { if (includeInProject && ProjectService.OpenSolution != null) {
// get ProjectItems in source directory // get ProjectItems in source directory
FileService.CopyFile(directoryName, copiedFileName, true, false);
foreach (IProject project in ProjectService.OpenSolution.Projects) { foreach (IProject project in ProjectService.OpenSolution.Projects) {
if (!FileUtility.IsBaseDirectory(project.Directory, directoryName)) if (!FileUtility.IsBaseDirectory(project.Directory, directoryName))
continue; continue;
@ -111,7 +112,6 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
} }
} }
FileService.CopyFile(directoryName, copiedFileName, true, false);
DirectoryNode newNode = new DirectoryNode(copiedFileName); DirectoryNode newNode = new DirectoryNode(copiedFileName);
newNode.InsertSorted(node); newNode.InsertSorted(node);
if (includeInProject) { if (includeInProject) {
@ -365,7 +365,7 @@ namespace ICSharpCode.SharpDevelop.Project.Commands
FileTemplateResult result = SD.UIService.ShowNewFileDialog(node.Project, node.Directory); FileTemplateResult result = SD.UIService.ShowNewFileDialog(node.Project, node.Directory);
if (result != null) { if (result != null) {
node.RecreateSubNodes(); node.RecreateSubNodes();
ProjectBrowserPad.Instance.ProjectBrowserControl.SelectFile(result.Options.FileName); ProjectBrowserPad.Instance.ProjectBrowserControl.SelectFile(result.Options.FileName);
return result.NewFiles.Select(node.Project.FindFile).Where(f => f != null).ToArray(); return result.NewFiles.Select(node.Project.FindFile).Where(f => f != null).ToArray();
} else { } else {
return null; return null;

Loading…
Cancel
Save