]> git.lyx.org Git - lyx.git/blobdiff - src/rowpainter.C
more cursor dispatch
[lyx.git] / src / rowpainter.C
index 7772d889f216f1c6153f81daf2530a539a91f142..d9f8001afe9fafab5aa5e37ccfa45a5f6e74732f 100644 (file)
@@ -136,8 +136,9 @@ RowPainter::RowPainter(BufferView const & bv, LyXText const & text,
                paintBackground();
 
        // paint the selection background
-       if (bv_.cursor().selection() && &text_ == bv_.cursor().innerText())
-               paintSelection();
+#warning look here for selection
+       //if (bv_.cursor().selection() && &text_ == bv_.cursor().innerText())
+       //      paintSelection();
 
        // vertical lines for appendix
        paintAppendix();
@@ -193,10 +194,11 @@ int RowPainter::leftMargin() const
 
 void RowPainter::paintInset(pos_type const pos)
 {
-       InsetBase * inset = const_cast<InsetBase *>(pit_->getInset(pos));
+       InsetBase const * inset = pit_->getInset(pos);
        BOOST_ASSERT(inset);
        PainterInfo pi(const_cast<BufferView *>(&bv_));
        pi.base.font = getFont(pos);
+       inset->drawSelection(pi, int(x_), yo_ + row_.baseline());
        inset->draw(pi, int(x_), yo_ + row_.baseline());
        x_ += inset->width();
 }