Update of /cvsroot/libufo/ufo-0.5/src/ui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30746/src/ui
Modified Files:
ustylemanager.cpp
Log Message:
Fixed copying in putStyleHints.
Index: ustylemanager.cpp
===================================================================
RCS file: /cvsroot/libufo/ufo-0.5/src/ui/ustylemanager.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ustylemanager.cpp 2 Sep 2005 14:28:38 -0000 1.2
--- ustylemanager.cpp 2 Sep 2005 14:34:05 -0000 1.3
***************
*** 219,223 ****
void
UStyleManager::putStyleHints(const std::string & classid, UStyleHints * styleHints) {
! m_hints[classid] = styleHints;
}
--- 219,225 ----
void
UStyleManager::putStyleHints(const std::string & classid, UStyleHints * styleHints) {
! if (styleHints) {
! m_hints[classid] = styleHints->clone();;
! }
}
***************
*** 228,232 ****
const std::string & name,
UStyleHints * styleHints) {
! m_hints[concat(type, classId, name)] = styleHints;
}
--- 230,236 ----
const std::string & name,
UStyleHints * styleHints) {
! if (styleHints) {
! m_hints[concat(type, classId, name)] = styleHints->clone();;
! }
}
***************
*** 253,257 ****
// have we CSS style?
if (m_hints[concat("", classId, "")]) {
- // FIXME: mem leak
hints = hints->clone();
hints->transcribe(m_hints[concat("", classId, "")]);
--- 257,260 ----
|