Browse Source

Fixed forum-9315: view contents with customized save command (e.g. project options) are not saved when closing them and clicking 'Yes' in the 'Do you want to save?' question.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@4026 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
6fba7e0501
  1. 9
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs

9
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs

@ -346,18 +346,13 @@ namespace ICSharpCode.SharpDevelop.Gui
switch (dr) { switch (dr) {
case DialogResult.Yes: case DialogResult.Yes:
foreach (IViewContent vc in this.ViewContents) { foreach (IViewContent vc in this.ViewContents) {
if (!vc.IsDirty) continue; while (vc.IsDirty) {
if (vc.PrimaryFile != null) { ICSharpCode.SharpDevelop.Commands.SaveFile.Save(vc);
while (true) {
vc.Files.ForEach(ICSharpCode.SharpDevelop.Commands.SaveFile.Save);
if (vc.IsDirty) { if (vc.IsDirty) {
if (MessageService.AskQuestion("${res:MainWindow.DiscardChangesMessage}")) { if (MessageService.AskQuestion("${res:MainWindow.DiscardChangesMessage}")) {
fileDiscarded = true; fileDiscarded = true;
break; break;
} }
} else {
break;
}
} }
} }
} }

Loading…
Cancel
Save