Mercurial > hg > orthanc-stone
diff Applications/Samples/SimpleViewerApplicationSingleFile.h @ 411:3aa058dcd5fb
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 12 Nov 2018 16:07:42 +0100 |
parents | 5d359b115b29 |
children | aee3d7941c9b |
line wrap: on
line diff
--- a/Applications/Samples/SimpleViewerApplicationSingleFile.h Mon Nov 12 15:52:03 2018 +0100 +++ b/Applications/Samples/SimpleViewerApplicationSingleFile.h Mon Nov 12 16:07:42 2018 +0100 @@ -338,11 +338,13 @@ { const Json::Value& response = message.GetJson(); - if (response.isArray() && response.size() > 1) + if (response.isArray() && + response.size() >= 1) { SelectStudy(response[0].asString()); } } + void OnStudyReceived(const OrthancApiClient::JsonResponseReadyMessage& message) { const Json::Value& response = message.GetJson(); @@ -402,6 +404,7 @@ void SelectStudy(const std::string& studyId) { + LOG(INFO) << "Selecting study: " << studyId; orthancApiClient_->GetJsonAsync("/studies/" + studyId, new Callable<SimpleViewerApplication, OrthancApiClient::JsonResponseReadyMessage>(*this, &SimpleViewerApplication::OnStudyReceived)); }