Handle item adding to DVC to a non-container node
This commit is contained in:
@@ -3094,6 +3094,14 @@ bool wxDataViewMainWindow::ItemAdded(const wxDataViewItem & parent, const wxData
|
||||
if ( !parentNode )
|
||||
return false;
|
||||
|
||||
// If the parent has not children then just mask it as container and return.
|
||||
// Nodes will be initialized in Expand().
|
||||
if ( !parentNode->HasChildren() )
|
||||
{
|
||||
parentNode->SetHasChildren(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// If the parent has children but child nodes was not initialized then
|
||||
// the node is collapsed so just return as nodes will be initialized in
|
||||
// Expand().
|
||||
|
||||
Reference in New Issue
Block a user