mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-04-02 21:49:43 +02:00
Arranged name properties in Element.cpp.
This commit is contained in:
11
Element.cpp
11
Element.cpp
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user