Skip to content

Commit

Permalink
Correct failure due to progress bar values (#3143)
Browse files Browse the repository at this point in the history
  • Loading branch information
pshriwise authored Sep 26, 2024
1 parent 57816e6 commit 890cab5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,10 +971,6 @@ void Plot::create_voxel() const

ProgressBar pb;
for (int z = 0; z < pixels_[2]; z++) {
// update progress bar
pb.set_value(
100. * static_cast<double>(z) / static_cast<double>((pixels_[2] - 1)));

// update z coordinate
pltbase.origin_.z = ll.z + z * vox[2];

Expand All @@ -989,6 +985,10 @@ void Plot::create_voxel() const

// Write to HDF5 dataset
voxel_write_slice(z, dspace, dset, memspace, data_flipped.data());

// update progress bar
pb.set_value(
100. * static_cast<double>(z + 1) / static_cast<double>((pixels_[2])));
}

voxel_finalize(dspace, dset, memspace);
Expand Down

0 comments on commit 890cab5

Please sign in to comment.