Arranged name properties in Element.cpp.

This commit is contained in:
Tats
2016-03-05 16:56:31 -05:00
parent f6ec081334
commit fcbc1b3aef
2 changed files with 11 additions and 5 deletions

View File

@@ -32,14 +32,21 @@ Element::Element(uid id, UidAllocator* allocator) : _name(""), _isLocked(false),
}
// Assign id.
_id = id;
// Reset name.
unsetName();
}
Element::~Element() {
_allocator->free(_id);
}
void Element::setName(const QString& name)
{
if (name != _name)
{
_name = name;
_emitPropertyChanged("name");
}
}
void Element::setLocked(bool locked)
{
if (locked != _isLocked)