Fixed assert from update_changed_tree_ui()

This commit is contained in:
YuSanka 2019-02-04 12:57:39 +01:00
parent f626f69e90
commit b1af538d72

View file

@ -504,6 +504,8 @@ void Tab::get_sys_and_mod_flags(const std::string& opt_key, bool& sys_page, bool
void Tab::update_changed_tree_ui() void Tab::update_changed_tree_ui()
{ {
if (m_options_list.empty())
return;
auto cur_item = m_treectrl->GetFirstVisibleItem(); auto cur_item = m_treectrl->GetFirstVisibleItem();
if (!cur_item || !m_treectrl->IsVisible(cur_item)) if (!cur_item || !m_treectrl->IsVisible(cur_item))
return; return;
@ -689,9 +691,9 @@ void Tab::update_visibility()
Thaw(); Thaw();
// to update tree items color // to update tree items color
wxTheApp->CallAfter([this]() { // wxTheApp->CallAfter([this]() {
update_changed_tree_ui(); update_changed_tree_ui();
}); // });
} }
Field* Tab::get_field(const t_config_option_key& opt_key, int opt_index/* = -1*/) const Field* Tab::get_field(const t_config_option_key& opt_key, int opt_index/* = -1*/) const