using std::string;
using std::vector;
using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using namespace dcpomatic;
ucol_setAttribute(_collator, UCOL_STRENGTH, UCOL_PRIMARY, &status);
ucol_setAttribute(_collator, UCOL_ALTERNATE_HANDLING, UCOL_SHIFTED, &status);
}
+
+ _config_connection = Config::instance()->Changed.connect(boost::bind(&ScreensPanel::config_changed, this, _1));
}
void
-ScreensPanel::search_changed ()
+ScreensPanel::clear_and_re_add()
{
_targets->DeleteAllItems ();
_screen_to_item.clear ();
add_cinemas ();
+}
+
+
+void
+ScreensPanel::search_changed ()
+{
+ clear_and_re_add();
_ignore_selection_change = true;
bool
ScreensPanel::notify_cinemas_changed()
{
+ _ignore_cinemas_changed = true;
+ ScopeGuard sg = [this]() { _ignore_cinemas_changed = false; };
+
try {
Config::instance()->changed(Config::CINEMAS);
} catch (FileError& e) {
}
+void
+ScreensPanel::config_changed(Config::Property property)
+{
+ if (property == Config::Property::CINEMAS && !_ignore_cinemas_changed) {
+ clear_and_re_add();
+ }
+}
+
+