Add File->Close to main DCP-o-matic (#1180).
[dcpomatic.git] / src / wx / controls.cc
index 01b689c9ec4db4f5b766a7d08b2d8e6a1bb487f4..5e68baaa005863bca4c04b7cafa4335b38ee37d4 100644 (file)
@@ -371,7 +371,10 @@ Controls::set_film (shared_ptr<Film> film)
        }
 
        _film = film;
-       _film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2));
+
+       if (_film) {
+               _film_change_connection = _film->Change.connect (boost::bind(&Controls::film_change, this, _1, _2));
+       }
 
        setup_sensitivity ();
 
@@ -388,9 +391,13 @@ Controls::film () const
 void
 Controls::film_change (ChangeType type, Film::Property p)
 {
-       if (type == CHANGE_TYPE_DONE && p == Film::CONTENT) {
-               setup_sensitivity ();
-               update_position_label ();
-               update_position_slider ();
+       if (type == CHANGE_TYPE_DONE) {
+               if (p == Film::CONTENT) {
+                       setup_sensitivity ();
+                       update_position_label ();
+                       update_position_slider ();
+               } else if (p == Film::THREE_D) {
+                       setup_sensitivity ();
+               }
        }
 }