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

Method SetCurrentSelection

Modules/QtWidgets/src/QmitkAbstractNodeSelectionWidget.cpp:169–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void QmitkAbstractNodeSelectionWidget::SetCurrentSelection(NodeList selectedNodes)
170{
171 if (!m_RecursionGuard)
172 {
173 m_CurrentExternalSelection = selectedNodes;
174
175 auto dataStorage = m_DataStorage.Lock();
176 NodeList newInternalSelection;
177 for (const auto &node : std::as_const(selectedNodes))
178 {
179 if (dataStorage.IsNotNull() && dataStorage->Exists(node) && (m_NodePredicate.IsNull() || m_NodePredicate->CheckNode(node)))
180 {
181 newInternalSelection.append(node);
182 }
183 }
184
185 this->HandleChangeOfInternalSelection(newInternalSelection);
186 }
187}
188
189const mitk::NodePredicateBase* QmitkAbstractNodeSelectionWidget::GetNodePredicate() const
190{

Callers 1

OnSelectionReceivedMethod · 0.95

Calls 6

IsNotNullMethod · 0.80
LockMethod · 0.45
ExistsMethod · 0.45
IsNullMethod · 0.45
CheckNodeMethod · 0.45

Tested by

no test coverage detected