size_t ParagraphMetrics::computeRowSignature(Row const & row,
- BufferParams const & bparams) const
+ BufferView const & bv) const
{
boost::crc_32_type crc;
for (pos_type i = row.pos(); i < row.endpos(); ++i) {
- char_type const b[] = { par_->getChar(i) };
- crc.process_bytes(b, sizeof(char_type));
- if (bparams.track_changes) {
+ if (par_->isInset(i)) {
+ Inset const * in = par_->getInset(i);
+ Dimension const d = in->dimension(bv);
+ int const b[] = { d.wid, d.asc, d.des };
+ crc.process_bytes(b, sizeof(b));
+ } else {
+ char_type const b[] = { par_->getChar(i) };
+ crc.process_bytes(b, sizeof(char_type));
+ }
+ if (bv.buffer().params().track_changes) {
Change change = par_->lookupChange(i);
char_type const b[] = { static_cast<char_type>(change.type) };
// 1 byte is enough to encode Change::Type
///
bool hfillExpansion(Row const & row, pos_type pos) const;
- ///
- size_t computeRowSignature(Row const &, BufferParams const & bparams) const;
+ ///
+ size_t computeRowSignature(Row const &, BufferView const & bv) const;
///
int position() const { return position_; }
void TextMetrics::drawParagraph(PainterInfo & pi, pit_type const pit, int const x, int y) const
{
- BufferParams const & bparams = bv_->buffer().params();
ParagraphMetrics const & pm = par_metrics_[pit];
if (pm.rows().empty())
return;
// Row signature; has row changed since last paint?
if (pi.pain.isDrawingEnabled())
- row.setCrc(pm.computeRowSignature(row, bparams));
+ row.setCrc(pm.computeRowSignature(row, *bv_));
bool row_has_changed = row.changed()
|| rowSlice == bv_->lastRowSlice();
- Fix display of collapsable insets when the same document is shown in
two views with different width (bug 9756).
+- fix display glitches when editing changes the dimension of insets
+ (bug 6691).
+
- Raise GuiView on buffer switch to bring it topmost in multi-window mode.
- Fix cursor position after Redo of a document settings change (bug