From f62dba8533e6c2f944956fa304205513abbcabbe Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Date: Fri, 6 Sep 2019 01:20:16 +0200 Subject: More improvements to line height. --- src/libnrtype/Layout-TNG-OutIter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/libnrtype') diff --git a/src/libnrtype/Layout-TNG-OutIter.cpp b/src/libnrtype/Layout-TNG-OutIter.cpp index 7d7ee98f0..88ce28db9 100644 --- a/src/libnrtype/Layout-TNG-OutIter.cpp +++ b/src/libnrtype/Layout-TNG-OutIter.cpp @@ -183,11 +183,13 @@ Layout::iterator Layout::sourceToIterator(void *source_cookie /*, Glib::ustring: unsigned char_index = _sourceToCharacter(source_index); + // Fix a bug when hidding content in flow box element + if (char_index >= _characters.size()) + return end(); + if (_input_stream[source_index]->Type() != TEXT_SOURCE) return iterator(this, char_index); - if (char_index >= _characters.size()) - return end(); return iterator(this, char_index); /* This code was never used, the text_iterator argument was "NULL" in all calling code InputStreamTextSource const *text_source = static_cast(_input_stream[source_index]); -- cgit v1.2.3