| 860 | } |
| 861 | |
| 862 | void QmitkDataStorageTreeModel::Update() |
| 863 | { |
| 864 | auto datastorage = m_DataStorage.Lock(); |
| 865 | if (datastorage.IsNotNull()) |
| 866 | { |
| 867 | mitk::DataStorage::SetOfObjects::ConstPointer _NodeSet = datastorage->GetAll(); |
| 868 | |
| 869 | /// Regardless the value of this preference, the new nodes must not be inserted |
| 870 | /// at the top now, but at the position according to their layer. |
| 871 | bool newNodesWereToBePlacedOnTop = m_PlaceNewNodesOnTop; |
| 872 | m_PlaceNewNodesOnTop = false; |
| 873 | |
| 874 | for (const auto& node : *_NodeSet) |
| 875 | { |
| 876 | this->AddNodeInternal(node); |
| 877 | } |
| 878 | |
| 879 | m_PlaceNewNodesOnTop = newNodesWereToBePlacedOnTop; |
| 880 | |
| 881 | /// Adjust the layers to ensure that derived nodes are above their sources. |
| 882 | this->AdjustLayerProperty(); |
| 883 | } |
| 884 | } |
| 885 | |
| 886 | void QmitkDataStorageTreeModel::SetAllowHierarchyChange(bool allowHierarchyChange) |
| 887 | { |
no test coverage detected