ContentMenu was keeping its initial film and not using the current one; should fix...
authorCarl Hetherington <cth@carlh.net>
Sat, 28 Dec 2013 23:49:56 +0000 (23:49 +0000)
committerCarl Hetherington <cth@carlh.net>
Sat, 28 Dec 2013 23:49:56 +0000 (23:49 +0000)
ChangeLog
src/wx/content_menu.cc
src/wx/content_menu.h
src/wx/film_editor.cc
src/wx/timeline.cc

index c80ad2e6342806b13609daee421b9b6153f7667c..38d967c032951dc7345735305c4ddbdeda5144a9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2013-12-28  Carl Hetherington  <cth@carlh.net>
 
+       * Speculative fix for "find missing" not working on OS X (#255).
+
        * Fix failure to load films with missing still image content (#300).
 
 2013-12-27  Carl Hetherington  <cth@carlh.net>
index 6372503d14db465069eb62b16ff010ad49dac0b8..b91c82ab154c99e4bb2860bb16e7272888c50992 100644 (file)
@@ -43,9 +43,8 @@ enum {
        ID_remove
 };
 
-ContentMenu::ContentMenu (shared_ptr<Film> f, wxWindow* p)
+ContentMenu::ContentMenu (wxWindow* p)
        : _menu (new wxMenu)
-       , _film (f)
        , _parent (p)
 {
        _repeat = _menu->Append (ID_repeat, _("Repeat..."));
@@ -66,8 +65,9 @@ ContentMenu::~ContentMenu ()
 }
 
 void
-ContentMenu::popup (ContentList c, wxPoint p)
+ContentMenu::popup (weak_ptr<Film> f, ContentList c, wxPoint p)
 {
+       _film = f;
        _content = c;
        _repeat->Enable (!_content.empty ());
 
index 9f4bd4cc4378059d116fc8d071660826ca6e0ac2..a9f9093c6ab5bb3c94d48244480bc1859495bbf2 100644 (file)
@@ -30,10 +30,10 @@ class Film;
 class ContentMenu
 {
 public:
-       ContentMenu (boost::shared_ptr<Film>, wxWindow *);
+       ContentMenu (wxWindow *);
        ~ContentMenu ();
 
-       void popup (ContentList, wxPoint);
+       void popup (boost::weak_ptr<Film>, ContentList, wxPoint);
 
 private:
        void repeat ();
@@ -43,6 +43,7 @@ private:
        void maybe_found_missing (boost::weak_ptr<Job>, boost::weak_ptr<Content>, boost::weak_ptr<Content>);
        
        wxMenu* _menu;
+       /** Film that we are working with; set up by popup() */
        boost::weak_ptr<Film> _film;
        wxWindow* _parent;
        ContentList _content;
index 04bf6d2a809c10334b4a2b13b165d67fe6d52e2b..dd3ec6b6770516133c81d9476026852895bb6373 100644 (file)
@@ -72,7 +72,7 @@ using boost::lexical_cast;
 /** @param f Film to edit */
 FilmEditor::FilmEditor (shared_ptr<Film> f, wxWindow* parent)
        : wxPanel (parent)
-       , _menu (f, this)
+       , _menu (this)
        , _generally_sensitive (true)
        , _timeline_dialog (0)
 {
@@ -966,7 +966,7 @@ FilmEditor::sequence_video_changed ()
 void
 FilmEditor::content_right_click (wxListEvent& ev)
 {
-       _menu.popup (selected_content (), ev.GetPoint ());
+       _menu.popup (_film, selected_content (), ev.GetPoint ());
 }
 
 void
index 0ac9a1d4bb6d513e6fa3bedbfe96eeae66441777..6cc1f79d93dd23c9d0b089648f36edcf1892c893 100644 (file)
@@ -336,7 +336,7 @@ Timeline::Timeline (wxWindow* parent, FilmEditor* ed, shared_ptr<Film> film)
        , _left_down (false)
        , _down_view_position (0)
        , _first_move (false)
-       , _menu (film, this)
+       , _menu (this)
        , _snap (true)
 {
 #ifndef __WXOSX__
@@ -574,7 +574,7 @@ Timeline::right_down (wxMouseEvent& ev)
                cv->set_selected (true);
        }
 
-       _menu.popup (selected_content (), ev.GetPosition ());
+       _menu.popup (_film, selected_content (), ev.GetPosition ());
 }
 
 void