database: Set an item's ID before reading it in
Tracks need to know their own ID to set up filtering properly. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
72a51fb78f
commit
2f1d7a73ce
|
@ -67,8 +67,8 @@ void Database<T> :: load()
|
|||
_db[i] = NULL;
|
||||
else {
|
||||
_db[i] = new T;
|
||||
_db[i]->read(_file);
|
||||
_db[i]->id = i;
|
||||
_db[i]->read(_file);
|
||||
_keys[_db[i]->primary_key()] = i;
|
||||
_size++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue