Fix aff/666: thumbnail scan is run twice when changing the content file of a film.
authorCarl Hetherington <cth@carlh.net>
Mon, 1 Oct 2012 20:02:19 +0000 (21:02 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 1 Oct 2012 20:02:19 +0000 (21:02 +0100)
.be/aff5ca2c-44ee-4ed6-800b-4abe9c3e794c/bugs/666e8ba3-f1a3-4245-9d00-9a3a5e048ed9/values
ChangeLog
src/wx/film_viewer.cc

index 8861f1d196f5bbc92839bfc3843c5ffab7d19861..26a0240ff6e235e27d9c67590abb210ea914c23f 100644 (file)
@@ -7,7 +7,7 @@ reporter: Carl Hetherington <cth@carlh.net>
 severity: minor
 
 
-status: open
+status: fixed
 
 
 summary: Re-setting content file runs thumb scan twice?
index b260b8745c4b29dc3c3161a886e8101136dd1501..65589eb934741664924420855c9ff14a08fdf8c8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-01  Carl Hetherington  <cth@carlh.net>
+
+       * Fix aff/666: thumbnail scan is run twice
+       when changing the content file for a film.
+
 2012-09-28  Carl Hetherington  <cth@carlh.net>
 
        * Fix crash bug which seems to have been
index 0d17baf8325f2a22805eb3a63c51b91ff0c44a90..e647a5886c8bcc6bf492ae20cf421baebc6476ad 100644 (file)
@@ -171,7 +171,7 @@ END_EVENT_TABLE ()
 
 FilmViewer::FilmViewer (Film* f, wxWindow* p)
        : wxPanel (p)
-       , _film (f)
+       , _film (0)
 {
        _sizer = new wxBoxSizer (wxVERTICAL);
        SetSizer (_sizer);
@@ -232,6 +232,10 @@ FilmViewer::film_changed (Film::Property p)
 void
 FilmViewer::set_film (Film* f)
 {
+       if (_film == f) {
+               return;
+       }
+       
        _film = f;
        _thumb_panel->set_film (_film);