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

Method Activated

Modules/Segmentation/src/Interactions/mitkTool.cpp:134–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132}
133
134void mitk::Tool::Activated()
135{
136 // As a legacy solution the display interaction of the new interaction framework is disabled here to avoid conflicts
137 // with tools
138 // Note: this only affects InteractionEventObservers (formerly known as Listeners) all DataNode specific interaction
139 // will still be enabled
140 m_DisplayInteractionConfigs.clear();
141 auto eventObservers = us::GetModuleContext()->GetServiceReferences<InteractionEventObserver>();
142 for (const auto& eventObserver : eventObservers)
143 {
144 auto displayActionEventBroadcast = dynamic_cast<DisplayActionEventBroadcast*>(
145 us::GetModuleContext()->GetService<InteractionEventObserver>(eventObserver));
146 if (nullptr != displayActionEventBroadcast)
147 {
148 // remember the original configuration
149 m_DisplayInteractionConfigs.insert(std::make_pair(eventObserver, displayActionEventBroadcast->GetEventConfig()));
150 // here the alternative configuration is loaded
151 displayActionEventBroadcast->AddEventConfig(m_EventConfig.c_str());
152 }
153 }
154}
155
156void mitk::Tool::Deactivated()
157{

Callers 2

ActivateToolMethod · 0.45
RegisterClientMethod · 0.45

Calls 4

GetModuleContextFunction · 0.85
GetEventConfigMethod · 0.80
AddEventConfigMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected