a lot of changes in modules

This commit is contained in:
Eduardo Bart
2012-02-06 17:19:47 -02:00
parent add8505a5b
commit 88301c329a
50 changed files with 488 additions and 322 deletions

View File

@@ -48,8 +48,16 @@ bool FontManager::importFont(std::string fontFile)
OTMLNodePtr fontNode = doc->at("Font");
std::string name = fontNode->valueAt("name");
if(fontExists(name))
Fw::throwException("font '", name, "' already exists, cannot have duplicate font names");
//if(fontExists(name))
// Fw::throwException("font '", name, "' already exists, cannot have duplicate font names");
// remove any font with the same name
for(auto it = m_fonts.begin(); it != m_fonts.end(); ++it) {
if((*it)->getName() == name) {
m_fonts.erase(it);
break;
}
}
FontPtr font(new Font(name));
font->load(fontNode);