Don't try to delete the same items more than once!
This commit is contained in:
parent
147c5604e0
commit
da3c2603bc
1 changed files with 3 additions and 0 deletions
|
@ -35,6 +35,7 @@ Node::Node(const QVector<QVariant> &data, Node *parent)
|
||||||
Node::~Node()
|
Node::~Node()
|
||||||
{
|
{
|
||||||
qDeleteAll(m_childItems);
|
qDeleteAll(m_childItems);
|
||||||
|
m_childItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Node::appendChild(Node *item)
|
void Node::appendChild(Node *item)
|
||||||
|
@ -164,6 +165,7 @@ TileSetNode::TileSetNode(QString tileSetName, Node *parent) : m_tileSetName(tile
|
||||||
TileSetNode::~TileSetNode()
|
TileSetNode::~TileSetNode()
|
||||||
{
|
{
|
||||||
qDeleteAll(m_childItems);
|
qDeleteAll(m_childItems);
|
||||||
|
m_childItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant TileSetNode::data(int column, int role) const
|
QVariant TileSetNode::data(int column, int role) const
|
||||||
|
@ -191,6 +193,7 @@ TileTypeNode::TileTypeNode(TileModel::TNodeTileType type, Node *parent) : m_node
|
||||||
TileTypeNode::~TileTypeNode()
|
TileTypeNode::~TileTypeNode()
|
||||||
{
|
{
|
||||||
qDeleteAll(m_childItems);
|
qDeleteAll(m_childItems);
|
||||||
|
m_childItems.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant TileTypeNode::data(int column, int role) const
|
QVariant TileTypeNode::data(int column, int role) const
|
||||||
|
|
Loading…
Reference in a new issue