| 88 | } |
| 89 | |
| 90 | void mitk::DisplayActionEventHandler::InitActions(std::string prefixFilter /* = "" */) |
| 91 | { |
| 92 | auto observableBroadcast = m_ObservableBroadcast.Lock(); |
| 93 | |
| 94 | if (observableBroadcast.IsNull()) |
| 95 | { |
| 96 | mitkThrow() << "No display action event broadcast class set to observe. Use 'SetObservableBroadcast' before initializing actions."; |
| 97 | } |
| 98 | |
| 99 | // remove all current display action events as observer |
| 100 | auto allObserverTags = GetAllObserverTags(); |
| 101 | for (const auto& tag : allObserverTags) |
| 102 | { |
| 103 | observableBroadcast->RemoveObserver(tag); |
| 104 | } |
| 105 | m_ObserverTags.clear(); |
| 106 | |
| 107 | InitActionsImpl(prefixFilter); |
| 108 | } |
| 109 | |
| 110 | void mitk::DisplayActionEventHandler::InitActionsImpl(const std::string&) |
| 111 | { |
no test coverage detected