| 1443 | } |
| 1444 | |
| 1445 | void QmitkMultiLabelInspector::OnAddLabel() |
| 1446 | { |
| 1447 | auto currentIndex = this->m_Controls->view->currentIndex(); |
| 1448 | auto groupIDVariant = currentIndex.data(QmitkMultiLabelTreeModel::ItemModelRole::GroupIDRole); |
| 1449 | |
| 1450 | if (groupIDVariant.isValid()) |
| 1451 | { |
| 1452 | auto groupID = groupIDVariant.value<mitk::MultiLabelSegmentation::GroupIndexType>(); |
| 1453 | this->AddNewLabelInternal(groupID); |
| 1454 | |
| 1455 | // this is needed as workaround for (T27307). It circumvents the fact that modifications |
| 1456 | // of data (here the segmentation) does not directly trigger the modification of the |
| 1457 | // owning node (see T27307). Therefore other code (like renderers or model views) that e.g. |
| 1458 | // listens to the datastorage for modification would not get notified. |
| 1459 | if (m_SegmentationNode.IsNotNull()) |
| 1460 | { |
| 1461 | m_SegmentationNode->Modified(); |
| 1462 | } |
| 1463 | } |
| 1464 | } |
| 1465 | |
| 1466 | void QmitkMultiLabelInspector::OnAddLabelInstance() |
| 1467 | { |
nothing calls this directly
no test coverage detected