projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1f8b61e
)
Check modified before File -> Close happens.
author
Carl Hetherington
<cth@carlh.net>
Thu, 10 Jan 2019 22:13:08 +0000
(22:13 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 10 Jan 2019 22:13:08 +0000
(22:13 +0000)
src/tools/dcpomatic.cc
patch
|
blob
|
history
diff --git
a/src/tools/dcpomatic.cc
b/src/tools/dcpomatic.cc
index a70d243d936b352847b805e3d4f9636290802384..7b5696a1c1581b8007a4a69a8160d68b38fe1065 100644
(file)
--- a/
src/tools/dcpomatic.cc
+++ b/
src/tools/dcpomatic.cc
@@
-590,6
+590,26
@@
private:
void file_close ()
{
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>());
}
set_film (shared_ptr<Film>());
}