Commit f5a38658 authored by Nathan Lee's avatar Nathan Lee
Browse files

Refer to correct array index in chunkAnchorPoint

Doesn't seem to make a difference in the "usual"
use case, but at least for Put on Path with the
Objects Dialog open, there is a difference.

Fix inbox#421

Cherry-pick from f09728fd (1.0alpha)
parent cbeb0db7
...@@ -291,13 +291,13 @@ Geom::Point Layout::chunkAnchorPoint(iterator const &it) const ...@@ -291,13 +291,13 @@ Geom::Point Layout::chunkAnchorPoint(iterator const &it) const
Alignment alignment = _paragraphs[_lines[_chunks[chunk_index].in_line].in_paragraph].alignment; Alignment alignment = _paragraphs[_lines[_chunks[chunk_index].in_line].in_paragraph].alignment;
if (alignment == LEFT || alignment == FULL) if (alignment == LEFT || alignment == FULL)
return Geom::Point(_chunks[chunk_index].left_x, _lines[chunk_index].baseline_y); return Geom::Point(_chunks[chunk_index].left_x, _lines[_chunks[chunk_index].in_line].baseline_y);
double chunk_width = _getChunkWidth(chunk_index); double chunk_width = _getChunkWidth(chunk_index);
if (alignment == RIGHT) if (alignment == RIGHT)
return Geom::Point(_chunks[chunk_index].left_x + chunk_width, _lines[chunk_index].baseline_y); return Geom::Point(_chunks[chunk_index].left_x + chunk_width, _lines[_chunks[chunk_index].in_line].baseline_y);
//centre //centre
return Geom::Point(_chunks[chunk_index].left_x + chunk_width * 0.5, _lines[chunk_index].baseline_y); return Geom::Point(_chunks[chunk_index].left_x + chunk_width * 0.5, _lines[_chunks[chunk_index].in_line].baseline_y);
} }
Geom::Rect Layout::characterBoundingBox(iterator const &it, double *rotation) const Geom::Rect Layout::characterBoundingBox(iterator const &it, double *rotation) const
......
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