Commit ddbe5f0e authored by Ole Untzelmann's avatar Ole Untzelmann
Browse files

Fixed PolyLine collection color update

parent 1a23ec78
Pipeline #3364 passed with stage
in 44 minutes and 46 seconds
......@@ -2276,7 +2276,7 @@ void PolyLineT<PointT>::
unsigned int offset = p->prop_size * _i;
// check out of range
if (offset + p->prop_size >= p->prop_data.size()) {
if (offset + p->prop_size > p->prop_data.size()) {
std::cerr << "PolyLineT::get_custom_property - out of range access" << std::endl;
return;
}
......
......@@ -118,6 +118,7 @@ public:
/// Trigger an update of the vbo
void update() { updateVBO_ = true; };
void resetVBO() {offsets_.clear();}
private:
......
......@@ -203,6 +203,10 @@ PolyLineCollection* PolyLineCollectionObject::collection() {
void PolyLineCollectionObject::update(UpdateType _type) {
if(_type == UPDATE_COLOR || _type == UPDATE_ALL){
collectionNode_->resetVBO();
}
collectionNode_->update();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment