Fixed bug in fields in style file;

No longer doing GetTextExtent("\n");
Moved pt boxes to style files;

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@390 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2007-05-18 22:22:18 +00:00
parent 4a6e10ad93
commit e9597a142c
14 changed files with 316 additions and 240 deletions
+5 -1
View File
@@ -44,7 +44,11 @@ class IndexMap : private vector<Value> {
/// Initialize this map with default values given a list of keys
/** has no effect if already initialized with the given keys */
bool init(const vector<Key>& keys) {
if (this->size() == keys.size() && (this->empty() || get_key(this->front()) == keys.front())) return false;
if (!this->empty() && (keys.empty() || get_key(this->front()) != keys.front())) {
// switch to different keys
clear();
}
if (this->size() == keys.size()) return false;
this->reserve(keys.size());
for(typename vector<Key>::const_iterator it = keys.begin() ; it != keys.end() ; ++it) {
const Key& key = *it;