1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-02-20 19:39:41 +00:00

Workaround inconsistencies with record status changes

This commit is contained in:
Kyle Cooley 2018-09-07 23:38:11 -04:00 committed by Andrei Kortunov
parent 1518d630ca
commit c1ec926f43

View file

@ -195,6 +195,10 @@ namespace CSMWorld
int start = getHighestIndex(topLeft).row();
int end = getHighestIndex(botRight).row();
// A change to record status (ex. Deleted) returns an invalid botRight
if (end == -1)
end = start;
// Handle each record
for (int row = start; row <= end; ++row)
{
@ -245,6 +249,11 @@ namespace CSMWorld
{
int start = getHighestIndex(topLeft).row();
int end = getHighestIndex(botRight).row();
// A change to record status (ex. Deleted) returns an invalid botRight
if (end == -1)
end = start;
for (int row = start; row <= end; ++row)
{
std::string raceId = mRaces.getId(row);
@ -299,9 +308,14 @@ namespace CSMWorld
void ActorAdapter::handleBodyPartChanged(const QModelIndex& topLeft, const QModelIndex& botRight)
{
int rowStart = getHighestIndex(topLeft).row();
int rowEnd = getHighestIndex(botRight).row();
for (int row = rowStart; row <= rowEnd; ++row)
int start = getHighestIndex(topLeft).row();
int end = getHighestIndex(botRight).row();
// A change to record status (ex. Deleted) returns an invalid botRight
if (end == -1)
end = start;
for (int row = start; row <= end; ++row)
{
// Race specified by part may need update
auto& record = mBodyParts.getRecord(row);