MCPcopy Create free account
hub / github.com/MITK/MITK / Update

Method Update

Modules/QtWidgets/src/QmitkDataStorageTreeModel.cpp:862–884  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

860}
861
862void 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
886void QmitkDataStorageTreeModel::SetAllowHierarchyChange(bool allowHierarchyChange)
887{

Callers 1

SetDataStorageMethod · 0.95

Calls 5

AddNodeInternalMethod · 0.95
AdjustLayerPropertyMethod · 0.95
IsNotNullMethod · 0.80
GetAllMethod · 0.80
LockMethod · 0.45

Tested by

no test coverage detected