Skip to content

Commit

Permalink
Fixed not asking to save unsaved work when clicking on New Chapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ynscription committed Oct 20, 2019
1 parent 1c945a3 commit 727a946
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Manga Scan Helper/FrontEnd/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,15 @@ private ButtonType WarnNotSaved () {
}

private void NewChapterMenuItem_Click (object sender, RoutedEventArgs e) {
if (_loadedChapter != null && !Saved) {
ButtonType warnRes = WarnNotSaved();
if (warnRes == ButtonType.Yes)
SaveChapterMenuItem_Click(sender, e);
else if (warnRes == ButtonType.Cancel)
return;
}


VistaFolderBrowserDialog folderDialog = new VistaFolderBrowserDialog();
bool? res = folderDialog.ShowDialog(this);
if (res ?? false) {
Expand Down

0 comments on commit 727a946

Please sign in to comment.