mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Minor improvement at element picture creation
Call once the uuid() method of element location instead of four (and so parse once time the xml) to store the uuid/picture and uuid/primitive to hash.
This commit is contained in:
@@ -237,14 +237,16 @@ bool ElementPictureFactory::build(const ElementsLocation &location,
|
|||||||
painter.end();
|
painter.end();
|
||||||
low_painter.end();
|
low_painter.end();
|
||||||
|
|
||||||
|
const auto uuid_ = location.uuid();
|
||||||
if (!picture) {
|
if (!picture) {
|
||||||
m_pictures_H.insert(location.uuid(), pic);
|
m_pictures_H.insert(uuid_, pic);
|
||||||
m_primitives_H.insert(location.uuid(), primitives_);
|
m_primitives_H.insert(uuid_, primitives_);
|
||||||
}
|
}
|
||||||
if (!low_picture) {
|
if (!low_picture) {
|
||||||
m_low_pictures_H.insert(location.uuid(), low_pic);
|
m_low_pictures_H.insert(uuid_, low_pic);
|
||||||
m_primitives_H.insert(location.uuid(), primitives_);
|
m_primitives_H.insert(uuid_, primitives_);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user