]> git.lyx.org Git - features.git/blobdiff - src/insets/Inset.cpp
Allow removing words from the personal dictionary, that weren't previously added.
[features.git] / src / insets / Inset.cpp
index cb10fa52cc65e9a04ffdaa80b6e76fb9c24a74a6..acd8ab2cf24a11b8a28e8103d066a6fb32e5da51 100644 (file)
@@ -237,6 +237,20 @@ docstring Inset::layoutName() const
 }
 
 
+InsetLayout const & Inset::getLayout() const
+{
+       if (!buffer_)
+               return DocumentClass::plainInsetLayout();
+       return buffer().params().documentClass().insetLayout(layoutName());
+}
+
+
+bool Inset::isPassThru() const
+{
+       return getLayout().isPassThru();
+}
+
+
 bool Inset::isFreeSpacing() const
 {
        return getLayout().isFreeSpacing();
@@ -261,6 +275,18 @@ bool Inset::isInToc() const
 }
 
 
+FontInfo Inset::getFont() const
+{
+       return getLayout().font();
+}
+
+
+FontInfo Inset::getLabelfont() const
+{
+       return getLayout().labelfont();
+}
+
+
 docstring Inset::toolTip(BufferView const &, int, int) const
 {
        return docstring();
@@ -326,6 +352,8 @@ void Inset::dispatch(Cursor & cur, FuncRequest & cmd)
        cur.screenUpdateFlags(Update::Force | Update::FitCursor);
        cur.dispatched();
        doDispatch(cur, cmd);
+       if (cmd.origin() == FuncRequest::TOC)
+               cur.bv().processUpdateFlags(cur.result().screenUpdate());
 }
 
 
@@ -558,7 +586,12 @@ void Inset::drawMarkers(PainterInfo & pi, int x, int y) const
 
 bool Inset::editing(BufferView const * bv) const
 {
-       return bv->cursor().isInside(this);
+       if (bv->mouseSelecting())
+               // Avoid flicker when selecting with the mouse: when so, do not make
+               // decisions about metrics based on the mouse location.
+               return bv->cursor().realAnchor().isInside(this);
+       else
+               return bv->cursor().isInside(this);
 }
 
 
@@ -580,20 +613,6 @@ bool Inset::covers(BufferView const & bv, int x, int y) const
 }
 
 
-InsetLayout const & Inset::getLayout() const
-{
-       if (!buffer_)
-               return DocumentClass::plainInsetLayout();
-       return buffer().params().documentClass().insetLayout(layoutName());
-}
-
-
-bool Inset::isPassThru() const
-{
-       return getLayout().isPassThru();
-}
-
-
 bool Inset::undefined() const
 {
        docstring const & n = getLayout().name();