Преглед изворни кода

Fix for the failure of PublishData in ObjectLocatorCache

Anthony Dass пре 13 година
родитељ
комит
b0246d05c3
1 измењених фајлова са 9 додато и 7 уклоњено
  1. 9 7
      Plugins/org.commontk.dah.core/ctkDicomObjectLocatorCache.cpp

+ 9 - 7
Plugins/org.commontk.dah.core/ctkDicomObjectLocatorCache.cpp

@@ -111,22 +111,24 @@ bool ctkDicomObjectLocatorCache::isCached(const ctkDicomAppHosting::AvailableDat
       }
     // Loop over studies
     foreach(const ctkDicomAppHosting::Study& study, patient.studies)
-      {
+    {
       // Loop over study level object descriptors
       foreach(const ctkDicomAppHosting::ObjectDescriptor& objectDescriptor, study.objectDescriptors)
-        {
-        if (!uuids.contains(objectDescriptor.descriptorUUID))
+      {
+          if (!hasCachedData) { hasCachedData = true; }
+          if (!uuids.contains(objectDescriptor.descriptorUUID))
           {
           return false;
           }
-        }
+      }
       // Loop over series
       foreach(const ctkDicomAppHosting::Series& series, study.series)
-        {
+      {
         // Loop over series level object descriptors
         foreach(const ctkDicomAppHosting::ObjectDescriptor& objectDescriptor, series.objectDescriptors)
-          {
-          if (!uuids.contains(objectDescriptor.descriptorUUID))
+        {
+            if (!hasCachedData) { hasCachedData = true; }
+            if (!uuids.contains(objectDescriptor.descriptorUUID))
             {
             return false;
             }