s.removeCustomFormat(ftype);
}
}
+ // TODO: invalidate only affected cached formats... if that's possible with less overhead than just rebuilding them
+ _cachedFormats.clear();
}
QTextCharFormat UiStyle::format(FormatType ftype, Settings::Mode mode) const {
if(ftype & 0x00800000) fmt.merge(format((FormatType)(ftype & 0xf0800000))); // background
// URL
if(ftype & Url) fmt.merge(format(Url));
+ _cachedFormats[ftype] = fmt;
return fmt;
}