Strike through deleted previews (expect for inline math where it is already taken care of by RowPainter).
/// An inset with an instant preview
class InsetPreview : public InsetText {
-
+
public:
///
InsetPreview(Buffer *);
Inset * clone() const { return new InsetPreview(*this); }
bool neverIndent() const { return true; }
-
+
InsetCode lyxCode() const { return PREVIEW_CODE; }
-
+
docstring layoutName() const { return from_ascii("Preview"); }
-
+
bool descendable(BufferView const & /*bv*/) const { return true; }
std::string contextMenuName() const
void write(std::ostream & os) const;
void edit(Cursor & cur, bool front, EntryDirection entry_from);
+
+ bool canPaintChange(BufferView const &) const { return true; };
//@}
-
+
protected:
/// Retrieves the preview state. Returns true if preview
/// is enabled and the preview image is availabled.
y - theFontMetrics(font).maxAscent() - 4,
stat, font);
}
+ pi.change_.paintCue(pi, x, y - dim_.asc,
+ x + dim_.width(), y - dim_.asc + dim_.height());
}
#include "frontends/Painter.h"
#include "support/convert.h"
-#include "support/lassert.h"
#include "support/debug.h"
-#include "support/filetools.h"
#include "support/gettext.h"
+#include "support/filetools.h"
+#include "support/lassert.h"
#include "support/lstrings.h"
+#include "support/RefChanger.h"
#include <sstream>
}
if (previewState(bv)) {
- // FIXME CT this
+ // Do not draw change tracking cue if taken care of by RowPainter
+ // already.
+ Changer dummy = make_change(pi.change_, Change(), !canPaintChange(*bv));
if (previewTooSmall(dim)) {
// we have an extra frame
preview_->draw(pi, x + ERROR_FRAME_WIDTH, y);