void MicrobePointLineObject::objectRemoved() { GraphLayoutObject * layout = dynamic_cast<GraphLayoutObject*>(_parent); if(layout && layout->getPatientKeyObject()) { layout->getPatientKeyObject()->unref(this); } }
void MicrobePointLineObject::objectAdded() { GraphLayoutObject * layout = dynamic_cast<GraphLayoutObject*>(_parent); if(layout && layout->getPatientKeyObject()) { bool addKey = !layout->getPatientKeyObject()->hasRef(); layout->getPatientKeyObject()->ref(this); if(addKey) { layout->addLineObject(layout->getPatientKeyObject()); } } }