mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user