Force redraw of row if we changed (John's patch fix for #268)

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3708 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Vigna 2002-03-11 14:04:41 +00:00
parent c7fc42d88c
commit 4be2b9b40f
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,7 @@
2002-03-11 Juergen Vigna <jug@sad.it>
* insetgraphics.C (draw): hack to fix the redrawing bug.
(draw): seems this fixes #268 (force redraw of row if we changed).
* insettext.C (updateInsetInInset): fixed for updates in insets inside
this inset text (don't know why I missed this earlier).

View File

@ -322,6 +322,7 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
// This will draw the graphics. If the graphics has not been loaded yet,
// we draw just a rectangle.
Painter & paint = bv->painter();
grfx::ImageStatus old_status_ = cached_status_;
if (drawImage()) {
// lyxerr << "IG(" << this << "): " << old_x << endl;
@ -354,6 +355,12 @@ void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
}
}
// the status message may mean we changed size, so indicate
// we need a row redraw
if (old_status_ != cached_status_) {
bv->getLyXText()->status(bv, LyXText::CHANGED_IN_DRAW);
}
// Reset the cache, ready for the next draw request
cached_status_ = grfx::ErrorUnknown;
cached_image_.reset(0);