Added update_tab_presets functions to m_cc_preset_choise filling

This commit is contained in:
YuSanka 2018-04-06 15:42:52 +02:00
parent e4b767e840
commit 004f9ba1e5
6 changed files with 74 additions and 19 deletions

View file

@ -126,7 +126,19 @@ wxSize wxDataViewTreeCtrlComboPopup::GetAdjustedSize(int minWidth, int prefHeigh
{
// matches owner wxComboCtrl's width
// and sets height dinamically in dependence of contained items count
return wxSize(DefaultWidth, DefaultHeight);
wxComboCtrl* cmb = GetComboCtrl();
if (cmb != nullptr)
{
wxSize size = GetComboCtrl()->GetSize();
if (m_cnt_open_items > 0)
size.SetHeight(m_cnt_open_items * DefaultItemHeight);
else
size.SetHeight(DefaultHeight);
return size;
}
else
return wxSize(DefaultWidth, DefaultHeight);
}
void wxDataViewTreeCtrlComboPopup::OnKeyEvent(wxKeyEvent& evt)