diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 544e7fcebc..e1628deffc 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,6 +1,7 @@ 2002-03-11 Juergen Vigna * 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). diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index 9f2063250c..6391435bc7 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -322,7 +322,8 @@ 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; paint.image(old_x + 2, baseline - lascent, @@ -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);