shields: set marker after collision test

This commit is contained in:
Jiri Drbalek 2015-08-04 13:38:52 +00:00
parent 162f82cba5
commit c1d8095d59

View file

@ -423,10 +423,10 @@ bool placement_finder::add_marker(glyph_positions_ptr & glyphs, pixel_position c
pixel_position real_pos = (marker_unlocked_ ? pos : glyphs->get_base_point()) + marker_displacement_;
box2d<double> bbox = marker_box_;
bbox.move(real_pos.x, real_pos.y);
glyphs->set_marker(marker_, real_pos);
if (collision(bbox, layouts_.text(), false)) return false;
detector_.insert(bbox);
bboxes.push_back(std::move(bbox));
glyphs->set_marker(marker_, real_pos);
return true;
}