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).
// 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,
}
}
+ // 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);