This is caused in inventorymodel.cpp, the total size of the crypt and
library are intialised to be 0 on line 286 and 328 and then the xml
property set from this. The size is never updated after initialisation at
0. I verified this by changing the initialised value of 0 and compiling and
the exports do indeed show whatever I set it to.
284 // Add the crypt node
285 nCrypt = my_xmlNewChild (nRoot, NULL, wxT ("crypt"), wxT (""));
286 sCount = wxT ("0");
287 my_xmlNewProp (nCrypt, wxT("size"), sCount);
.
326 // Add the library node
327 nLibrary = my_xmlNewChild (nRoot, NULL, wxT ("library"), wxT (""));
328 sCount = wxT ("0");
329 my_xmlNewProp (nLibrary, wxT ("size"), sCount);
I am happy to fix this but what should the value be? Should it be the
number of unique cards in the library/crypt in your inventory or the total
number of cards you have/want/need?
E.G. Inventory contains only 1 Abdelsobek and 2 Adana de Sforza. Should the
crypt count show 2 or 3 (3 since there is 1 of Abdelsobek and 2 Adana)?
If it is the former (i.e. a count of unique library/crypt cards in the
inventory) then the attached patch will resolve this issue.
Attachments:
export_count.patch 715 bytes
I think it should total number of owned cards. In your example it should 3.
No problem, new patch attached which sets to the total to be the total
number of library/crypt cards the user has. I thought about adjusting the
SQL to have SQLite calculate it but I don't think it's as efficient as just
adding it up since the model already traverses all of the library and crypt
cards.
Attachments:
export_count_have_totals.patch 2.4 KB