projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
493ed48
)
Fix crash when adding cinemas while a search is in force (#2378).
author
Carl Hetherington
<cth@carlh.net>
Wed, 23 Nov 2022 20:20:14 +0000
(21:20 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 23 Nov 2022 20:23:25 +0000
(21:23 +0100)
src/wx/screens_panel.cc
patch
|
blob
|
history
diff --git
a/src/wx/screens_panel.cc
b/src/wx/screens_panel.cc
index b7defe0e9be39e482d6163fe1f4f1972edb21330..1d94d1acb9f8027a571403d1811698bdbb73f2ac 100644
(file)
--- a/
src/wx/screens_panel.cc
+++ b/
src/wx/screens_panel.cc
@@
-249,7
+249,12
@@
ScreensPanel::add_cinema_clicked ()
wxTreeListItem previous = wxTLI_FIRST;
bool found = false;
+ auto search = wx_to_std(_search->GetValue());
+ convert_to_lower(search);
for (auto existing_cinema: cinemas) {
+ if (!matches_search(existing_cinema, search)) {
+ continue;
+ }
if (_collator.compare(dialog->name(), existing_cinema->name) < 0) {
/* existing_cinema should be after the one we're inserting */
found = true;