Delete the children of the toplevelitems of the treewidget before adding
new tables.