Fixed back-end warning infrastructure: The Print / PrintObject

should have been derived from ObjectBase, not from ObjectID.
This commit is contained in:
bubnikv 2020-07-21 15:33:28 +02:00
parent 6057fb9595
commit f7ceffb46e
5 changed files with 12 additions and 10 deletions

View file

@ -399,7 +399,7 @@ public:
// in the notification center.
const PrintObject* get_object(ObjectID object_id) const {
auto it = std::find_if(m_objects.begin(), m_objects.end(),
[object_id](const PrintObject *obj) { return *static_cast<const ObjectID*>(obj) == object_id; });
[object_id](const PrintObject *obj) { return obj->id() == object_id; });
return (it == m_objects.end()) ? nullptr : *it;
}
const PrintRegionPtrs& regions() const { return m_regions; }