| 154 | } |
| 155 | |
| 156 | void mitk::Tool::Deactivated() |
| 157 | { |
| 158 | // Re-enabling InteractionEventObservers that have been previously disabled for legacy handling of Tools |
| 159 | // in new interaction framework |
| 160 | for (const auto& displayInteractionConfig : m_DisplayInteractionConfigs) |
| 161 | { |
| 162 | if (displayInteractionConfig.first) |
| 163 | { |
| 164 | auto displayActionEventBroadcast = static_cast<mitk::DisplayActionEventBroadcast*>( |
| 165 | us::GetModuleContext()->GetService<mitk::InteractionEventObserver>(displayInteractionConfig.first)); |
| 166 | |
| 167 | if (nullptr != displayActionEventBroadcast) |
| 168 | { |
| 169 | // here the regular configuration is loaded again |
| 170 | displayActionEventBroadcast->SetEventConfig(displayInteractionConfig.second); |
| 171 | } |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | m_DisplayInteractionConfigs.clear(); |
| 176 | } |
| 177 | |
| 178 | itk::Object::Pointer mitk::Tool::GetGUI(const std::string &toolkitPrefix, const std::string &toolkitPostfix) |
| 179 | { |
no test coverage detected