diff --git a/src/placement_finder.cpp b/src/placement_finder.cpp index 0d91f81c2..fe11dfc24 100644 --- a/src/placement_finder.cpp +++ b/src/placement_finder.cpp @@ -432,7 +432,11 @@ void placement_finder::find_point_placement(double label_x, double la current_placement->center.y - dy - ci.ymax); // if there is an overlap with existing envelopes, then exit - no placement - if (!detector_.extent().intersects(e) || (!p.allow_overlap && !detector_.has_point_placement(e, pi.get_actual_minimum_distance()))) { + + if (!detector_.extent().intersects(e) || + (!p.allow_overlap && + !detector_.has_point_placement(e, pi.get_actual_minimum_distance()))) + { return; } @@ -886,7 +890,10 @@ bool placement_finder::test_placement(const std::auto_ptr y - (cwidth*sina + ci.height()*cosa)); if (!detector_.extent().intersects(e) || - !detector_.has_placement(e, info_.get_string(), pi.get_actual_minimum_distance())) + (!p.allow_overlap && + !detector_.has_placement(e, info_.get_string(), pi.get_actual_minimum_distance()) + ) + ) { //std::clog << "No Intersects:" << !dimensions_.intersects(e) << ": " << e << " @ " << dimensions_ << std::endl; //std::clog << "No Placements:" << !detector_.has_placement(e, info.get_string(), p.minimum_distance) << std::endl;