Another attempt to get GTK wxDataViewCtrl to reload properly.

This commit is contained in:
Jeff Young 2020-02-26 14:41:12 +00:00
parent b1fd931251
commit 4c563b541e
1 changed files with 9 additions and 2 deletions

View File

@ -225,7 +225,7 @@ public:
void SetProvider( DRC_ITEMS_PROVIDER* aProvider )
{
BeforeReset();
Cleared();
delete m_drcItemsProvider;
m_drcItemsProvider = aProvider;
@ -242,9 +242,16 @@ public:
if( drcItem->HasSecondItem() )
node.m_Children.emplace_back( &node, drcItem, DRC_TREE_NODE::AUX_ITEM );
wxDataViewItemArray childItems;
for( DRC_TREE_NODE& child : node.m_Children )
childItems.Add( ToItem( &child ) );
ItemAdded( ToItem( nullptr ), ToItem( &node ) );
ItemsAdded( ToItem( &node ), childItems );
}
AfterReset();
ExpandAll();
}