Bugfix: the region_volumes vector was not always extended after creating new regions, causing bad memory access in apply_config(). #2446

This commit is contained in:
Alessandro Ranellucci 2014-12-24 18:35:59 +01:00
parent 33f7b08c80
commit 5639132dae
3 changed files with 6 additions and 10 deletions

View file

@ -76,8 +76,10 @@ class PrintObject
friend class Print;
public:
// vector of (vectors of volume ids), indexed by region_id
std::vector<std::vector<int> > region_volumes;
// map of (vectors of volume ids), indexed by region_id
/* (we use map instead of vector so that we don't have to worry about
resizing it and the [] operator adds new items automagically) */
std::map< size_t,std::vector<int> > region_volumes;
PrintObjectConfig config;
t_layer_height_ranges layer_height_ranges;