| 438 | } |
| 439 | |
| 440 | void QmitkDataStorageComboBox::UpdateComboBoxText(const mitk::PropertyList* propertyList) |
| 441 | { |
| 442 | mitk::PropertyList* dataNodePropertyList = nullptr; |
| 443 | mitk::PropertyList* baseDataPropertyList = nullptr; |
| 444 | mitk::BaseData* baseData; |
| 445 | for (const auto& node : m_Nodes) |
| 446 | { |
| 447 | dataNodePropertyList = node->GetPropertyList(); |
| 448 | |
| 449 | baseData = dynamic_cast<mitk::BaseData*>(node->GetData()); |
| 450 | if (nullptr != baseData) |
| 451 | { |
| 452 | baseDataPropertyList = baseData->GetPropertyList(); |
| 453 | } |
| 454 | |
| 455 | if (propertyList == dataNodePropertyList |
| 456 | || propertyList == baseDataPropertyList) |
| 457 | { |
| 458 | // if one of the property list is the one that has just been modified |
| 459 | // get the node's index and set its text to the node name |
| 460 | // the node name might have been changed, depending on the modified property list |
| 461 | auto index = Find(node); |
| 462 | // update text in combobox |
| 463 | this->setItemText(index, QString::fromStdString(node->GetName())); |
| 464 | return; |
| 465 | } |
| 466 | } |
| 467 | } |
nothing calls this directly
no test coverage detected