mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-21 22:13:25 -06:00
#2286 AppFwk TreeSelection Editor : Always cache option items, rebuild tree when count changes
This commit is contained in:
parent
5ecedb7a30
commit
2ed7d74bbd
@ -151,12 +151,14 @@ void caf::PdmUiTreeSelectionQModel::setOptions(caf::PdmUiFieldEditorHandle* fiel
|
||||
{
|
||||
m_uiFieldHandle = field;
|
||||
|
||||
if (m_options.size() != options.size())
|
||||
bool mustRebuildOptionItemTree = m_options.size() != options.size();
|
||||
|
||||
m_options = options;
|
||||
|
||||
if (mustRebuildOptionItemTree)
|
||||
{
|
||||
beginResetModel();
|
||||
|
||||
m_options = options;
|
||||
|
||||
if (m_tree)
|
||||
{
|
||||
delete m_tree;
|
||||
|
Loading…
Reference in New Issue
Block a user