Don't need delete properties in method itemClicked.
--HG-- branch : feature
This commit is contained in:
parent
70a17f118e
commit
670e185465
|
@ -67,17 +67,12 @@ void VToolOptionsPropertyBrowser::itemClicked(QGraphicsItem *item)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<VProperty *, QString>::ConstIterator itProp = propertyToId.constBegin();
|
PropertyModel->clear();
|
||||||
while (itProp != propertyToId.constEnd())
|
|
||||||
{
|
|
||||||
delete itProp.key();
|
|
||||||
itProp++;
|
|
||||||
}
|
|
||||||
propertyToId.clear();
|
propertyToId.clear();
|
||||||
idToProperty.clear();
|
idToProperty.clear();
|
||||||
|
|
||||||
currentItem = item;
|
currentItem = item;
|
||||||
PropertyModel->clear();
|
|
||||||
if (currentItem == nullptr)
|
if (currentItem == nullptr)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -103,12 +103,12 @@ int VPropertySet::count() const
|
||||||
void VPropertySet::clear(bool delete_properties)
|
void VPropertySet::clear(bool delete_properties)
|
||||||
{
|
{
|
||||||
d_ptr->Properties.clear();
|
d_ptr->Properties.clear();
|
||||||
// while(!d_ptr->RootProperties.isEmpty()) {
|
while(!d_ptr->RootProperties.isEmpty()) {
|
||||||
// VProperty* tmpProp = d_ptr->RootProperties.takeLast();
|
VProperty* tmpProp = d_ptr->RootProperties.takeLast();
|
||||||
// if(tmpProp != NULL && delete_properties) {
|
if(tmpProp != nullptr && delete_properties) {
|
||||||
// delete tmpProp;
|
delete tmpProp;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString VPropertySet::getPropertyID(const VProperty *prop, bool look_for_parent_id) const
|
QString VPropertySet::getPropertyID(const VProperty *prop, bool look_for_parent_id) const
|
||||||
|
|
Loading…
Reference in New Issue
Block a user