| 60 | } |
| 61 | |
| 62 | void QmitkDataStorageHistoryModel::AddNodeToHistory(mitk::DataNode* node) |
| 63 | { |
| 64 | const std::lock_guard<std::mutex> lock(_historyMutex); |
| 65 | |
| 66 | auto finding = std::find(std::begin(_nodeHistory), std::end(_nodeHistory), node); |
| 67 | while (finding != std::end(_nodeHistory)) |
| 68 | { |
| 69 | _nodeHistory.erase(finding); |
| 70 | finding = std::find(std::begin(_nodeHistory), std::end(_nodeHistory), node); |
| 71 | } |
| 72 | |
| 73 | _nodeHistory.push_front(node); |
| 74 | } |
| 75 | |
| 76 | void QmitkDataStorageHistoryModel::ResetHistory() |
| 77 | { |