From: Carl Hetherington Date: Sun, 7 Jul 2019 23:07:12 +0000 (+0100) Subject: Fix flicker in timeline view when selecting (in some cases). X-Git-Tag: v2.15.11~1 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=e0da7a310a9e7f05c7c75fa7b39f1fb110567d60 Fix flicker in timeline view when selecting (in some cases). --- diff --git a/src/wx/content_panel.cc b/src/wx/content_panel.cc index 41a18f4b4..a860b0079 100644 --- a/src/wx/content_panel.cc +++ b/src/wx/content_panel.cc @@ -89,6 +89,7 @@ ContentPanel::ContentPanel (wxNotebook* n, shared_ptr film, weak_ptr wc) void ContentPanel::set_selection (ContentList cl) { + _no_check_selection = true; + ContentList content = _film->content (); for (size_t i = 0; i < content.size(); ++i) { if (find(cl.begin(), cl.end(), content[i]) != cl.end()) { @@ -670,6 +677,9 @@ ContentPanel::set_selection (ContentList cl) _content->SetItemState (i, 0, wxLIST_STATE_SELECTED); } } + + _no_check_selection = false; + check_selection (); } void diff --git a/src/wx/content_panel.h b/src/wx/content_panel.h index 8277b7c42..761b34a24 100644 --- a/src/wx/content_panel.h +++ b/src/wx/content_panel.h @@ -124,4 +124,5 @@ private: boost::weak_ptr _film_viewer; bool _generally_sensitive; bool _ignore_deselect; + bool _no_check_selection; };