From e0da7a310a9e7f05c7c75fa7b39f1fb110567d60 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 8 Jul 2019 00:07:12 +0100 Subject: [PATCH] Fix flicker in timeline view when selecting (in some cases). --- src/wx/content_panel.cc | 10 ++++++++++ src/wx/content_panel.h | 1 + 2 files changed, 11 insertions(+) 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; }; -- 2.30.2