projects
/
quassel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
858cba7
)
Styleengine fix
author
Manuel Nickschas
<sputnick@quassel-irc.org>
Thu, 8 May 2008 09:17:56 +0000
(09:17 +0000)
committer
Manuel Nickschas
<sputnick@quassel-irc.org>
Thu, 8 May 2008 09:17:56 +0000
(09:17 +0000)
src/uisupport/uistyle.cpp
patch
|
blob
|
history
diff --git
a/src/uisupport/uistyle.cpp
b/src/uisupport/uistyle.cpp
index
4cb7dff
..
a799d33
100644
(file)
--- a/
src/uisupport/uistyle.cpp
+++ b/
src/uisupport/uistyle.cpp
@@
-119,6
+119,8
@@
void UiStyle::setFormat(FormatType ftype, QTextCharFormat fmt, Settings::Mode mo
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 {
@@
-144,6
+146,7
@@
QTextCharFormat UiStyle::mergedFormat(quint32 ftype) {
if(ftype & 0x00800000) fmt.merge(format((FormatType)(ftype & 0xf0800000))); // background
// URL
if(ftype & Url) fmt.merge(format(Url));
+ _cachedFormats[ftype] = fmt;
return fmt;
}