return string((flags & Update::FitCursor) ? "FitCursor " : "")
+ ((flags & Update::Force) ? "Force " : "")
+ ((flags & Update::ForceDraw) ? "ForceDraw " : "")
- + ((flags & Update::SinglePar) ? "SinglePar " : "");
+ + ((flags & Update::SinglePar) ? "SinglePar " : "")
+ + ((flags & Update::Decoration) ? "Decoration " : "");
}
}
updateMetrics(flags);
}
+ // Detect whether we can only repaint a single paragraph.
+ // We handle this before FitCursor because the later will require
+ // correct metrics at cursor position.
+ if (!(flags & Update::ForceDraw)) {
+ if (singleParUpdate())
+ flags = flags | Update::SinglePar;
+ else
+ updateMetrics(flags);
+ }
+
// Then make sure that the screen contains the cursor if needed
if (flags & Update::FitCursor) {
if (needsFitCursor()) {
flags = flags & ~Update::FitCursor;
}
- // Finally detect whether we can only repaint a single paragraph
- if (!(flags & Update::ForceDraw)) {
- if (singleParUpdate())
- flags = flags | Update::SinglePar;
- else
- updateMetrics(flags);
- }
-
// Add flags to the the update flags. These will be reset to None
// after the redraw is actually done
d->update_flags_ = d->update_flags_ | flags;