]> git.lyx.org Git - features.git/blobdiff - src/RowPainter.cpp
Implement handling of row_flags for row breaking
[features.git] / src / RowPainter.cpp
index 44e4f7253479b64f27c42c37a423e5a6c4d87bae..656f89a4e0dbac12f5fffe9e2fd5c08cf7155329 100644 (file)
@@ -82,7 +82,11 @@ FontInfo RowPainter::labelFont(bool end) const
 
 void RowPainter::paintInset(Row::Element const & e) const
 {
-       // Handle selection
+       // Handle selection (first left/right, then middle).
+       pi_.selected_left = pi_.selected
+                           || (row_.isRTL() ? row_.end_margin_sel : row_.begin_margin_sel);
+       pi_.selected_right = pi_.selected
+                            || (row_.isRTL() ? row_.begin_margin_sel : row_.end_margin_sel);
        bool const pi_selected = pi_.selected;
        Cursor const & cur = pi_.base.bv->cursor();
        if (cur.selection() && cur.text() == &text_
@@ -561,6 +565,10 @@ void RowPainter::paintText()
 
                case Row::SPACE:
                        paintTextDecoration(e);
+                       break;
+
+               case Row::INVALID:
+                       LYXERR0("Trying to paint INVALID row element.");
                }
 
                // The markings of foreign languages