From f5a3865836b69eaf3500e0ea1d256e8a15eaa5a6 Mon Sep 17 00:00:00 2001 From: Nathan Lee <2431820-nathanal@users.noreply.gitlab.com> Date: Fri, 3 May 2019 19:48:32 +1000 Subject: [PATCH] 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 https://gitlab.com/inkscape/inbox/issues/421 Cherry-pick from f09728fd9ddf (1.0alpha) --- src/libnrtype/Layout-TNG-OutIter.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp index 6e648c32a2..1fd6a6a0f1 100644 --- a/src/libnrtype/Layout-TNG-OutIter.cpp +++ b/src/libnrtype/Layout-TNG-OutIter.cpp @@ -291,13 +291,13 @@ Geom::Point Layout::chunkAnchorPoint(iterator const &it) const Alignment alignment = _paragraphs[_lines[_chunks[chunk_index].in_line].in_paragraph].alignment; 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); 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 - 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 -- GitLab