close progress bar connections
authorAndrew Butler <andrew.butler33@gmail.com>
Fri, 23 Feb 2018 19:45:43 +0000 (14:45 -0500)
committerAndrew Butler <andrew.butler33@gmail.com>
Fri, 23 Feb 2018 19:45:43 +0000 (14:45 -0500)
R/loom.R

index f4e0c20412c99766a3e0057229de03b2de3ec197..893cf2381453357e318f9976adf228b01fcc6c93 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)
     },