]> git.lyx.org Git - features.git/commitdiff
Fix update bug when leaving a wide inset with up or down arrow.
authorRichard Heck <rgheck@comcast.net>
Mon, 13 Aug 2007 17:23:42 +0000 (17:23 +0000)
committerRichard Heck <rgheck@comcast.net>
Mon, 13 Aug 2007 17:23:42 +0000 (17:23 +0000)
Override notifyCursorLeaves() in InsetText to force update when
inset was wide. Should be removed if and when wide is.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19511 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetText.cpp
src/insets/InsetText.h

index 7439ae7659edefa00576ad661877ec35d7c01015..84ba92a9595fafe7eea1b44b96b27fd53ea16f59 100644 (file)
@@ -346,6 +346,13 @@ void InsetText::validate(LaTeXFeatures & features) const
 }
 
 
+bool InsetText::notifyCursorLeaves(Cursor & cur) { 
+       if(wide()) 
+               cur.updateFlags(cur.disp_.update() | Update::Force); 
+       return false; 
+} 
+
+
 void InsetText::cursorPos(BufferView const & bv,
                CursorSlice const & sl, bool boundary, int & x, int & y) const
 {
index cb38e4d574fe9ab4546f3eaa2e31c00e3f57d527..6d72ec31f11d7474875b015e55af967b4a0a6eac 100644 (file)
@@ -75,6 +75,9 @@ public:
        int docbook(Buffer const &, odocstream &, OutputParams const &) const;
        ///
        void validate(LaTeXFeatures & features) const;
+       //FIXME The following should be removed when wide is.
+       /// Overridden to force an update if the inset was wide().
+       virtual bool notifyCursorLeaves(Cursor & cur);
 
        /// return x,y of given position relative to the inset's baseline
        void cursorPos(BufferView const & bv, CursorSlice const & sl,