Merge branch 'develop' of github.com:mojaveazure/loomR into develop
[loomr.git] / R / loom.R
index c17a160dc8f4390e6062276b4d883d11697b1987..55bb8c3c7934ddae62ee9ca6a1569ecb9e649899 100644 (file)
--- a/R/loom.R
+++ b/R/loom.R
@@ -660,6 +660,9 @@ loom <- R6Class(
           setTxtProgressBar(pb = pb, value = i / length(x = batch))
         }
       }
+      if (display.progress) {
+        close(con = pb)
+      }
       # Clean up and allow chaining
       private$reset_batch()
       # Load layers and attributes
@@ -743,7 +746,9 @@ loom <- R6Class(
           results <- Reduce(f = rbind, x = results)
         }
       }
-
+      if (display.progress) {
+        close(con = pb)
+      }
       private$reset_batch()
       return(results)
     },