diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-01-10 22:13:08 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-01-10 22:13:08 +0000 |
| commit | 123854f87845e030f7b72c7edddb6b5e48242d41 (patch) | |
| tree | fb1502f8a93e6f12d0ee88d6937f9afe2224612b /src | |
| parent | 1f8b61e4d89622c9087c8c49ea988ad1c903f64e (diff) | |
Check modified before File -> Close happens.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index a70d243d9..7b5696a1c 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -590,6 +590,26 @@ private: void file_close () { + if (_film && _film->dirty ()) { + + FilmChangedClosingDialog* dialog = new FilmChangedClosingDialog (_film->name ()); + int const r = dialog->run (); + delete dialog; + + switch (r) { + case wxID_NO: + /* Don't save and carry on to close */ + break; + case wxID_YES: + /* Save and carry on to close */ + _film->write_metadata (); + break; + case wxID_CANCEL: + /* Stop */ + return; + } + } + set_film (shared_ptr<Film>()); } |
