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. 15
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs

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

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

Loading…
Cancel
Save