PUBLIC SETTER
| 187 | |
| 188 | //# PUBLIC SETTER |
| 189 | void QmitkPropertiesTableModel::SetPropertyList(mitk::PropertyList *_PropertyList) |
| 190 | { |
| 191 | // if propertylist really changed |
| 192 | if (m_PropertyList != _PropertyList) |
| 193 | { |
| 194 | auto propertyList = m_PropertyList.Lock(); |
| 195 | // Remove delete listener if there was a propertylist before |
| 196 | if (propertyList.IsNotNull()) |
| 197 | propertyList->RemoveObserver(m_PropertyListDeleteObserverTag); |
| 198 | |
| 199 | // set new list |
| 200 | m_PropertyList = _PropertyList; |
| 201 | propertyList = m_PropertyList.Lock(); |
| 202 | |
| 203 | if (propertyList.IsNotNull()) |
| 204 | { |
| 205 | auto command = itk::SimpleMemberCommand<QmitkPropertiesTableModel>::New(); |
| 206 | command->SetCallbackFunction(this, &QmitkPropertiesTableModel::PropertyListDelete); |
| 207 | m_PropertyListDeleteObserverTag = propertyList->AddObserver(itk::DeleteEvent(), command); |
| 208 | } |
| 209 | this->Reset(); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | void QmitkPropertiesTableModel::PropertyListDelete() |
| 214 | { |
no test coverage detected